語言

ToolboxService 類別

定義

提供介面的預設實作 IToolboxService 。

public ref class ToolboxService abstract : System::ComponentModel::Design::IComponentDiscoveryService, System::Drawing::Design::IToolboxService
public abstract class ToolboxService : System.ComponentModel.Design.IComponentDiscoveryService, System.Drawing.Design.IToolboxService
[System.Security.SecurityCritical]
public abstract class ToolboxService : System.ComponentModel.Design.IComponentDiscoveryService, System.Drawing.Design.IToolboxService
type ToolboxService = class
    interface IToolboxService
    interface IComponentDiscoveryService
[<System.Security.SecurityCritical>]
type ToolboxService = class
    interface IToolboxService
    interface IComponentDiscoveryService
Public MustInherit Class ToolboxService
Implements IComponentDiscoveryService, IToolboxService
繼承
ToolboxService
屬性
實作

備註

這個 ToolboxService 類別是介面的部分實作 IToolboxService 。 要使用此實作,必須從此類別衍生並實作抽象方法。 實作完成後,你可以將此類別加入設計應用程式的服務容器中。 每個設計師應用程式應該有一個工具箱服務。

ToolboxService 提供許多建立工具箱服務的複雜邏輯,但需要你定義分類和項目的儲存容器。 這讓工具箱可以選擇簡單到非常複雜的工具箱。

建構函式

名稱 Description
ToolboxService()

初始化 ToolboxService 類別的新執行個體。

屬性

名稱 Description
CategoryNames

會獲得一組串串,代表工具箱可用類別。

SelectedCategory

取得或設定目前所選類別的名稱。

SelectedItemContainer

取得或設定目前選取的物品容器。

方法

名稱 Description
CreateItemContainer(IDataObject)

從儲存的資料物件建立新的工具箱物品容器。

CreateItemContainer(ToolboxItem, IDesignerHost)

從工具箱物品建立一個新的工具箱物品容器。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
FilterChanged()

當工具箱服務偵測到啟用設計師的工具箱項目過濾器已更改時,會發生此現象。

GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetItemContainers()

回放並 IList 包含工具箱上的所有物品。

GetItemContainers(String)

回傳並 IList 包含給定類別中的所有項目。

GetToolboxItem(Type, Boolean)

回傳特定類型的工具箱物品。

GetToolboxItem(Type)

回傳特定類型的工具箱物品。

GetToolboxItems(Assembly, String, Boolean)

回傳給定組裝的物件 an ICollectionToolboxItem 。

GetToolboxItems(Assembly, String)

回傳並 ICollection 包含給定組件中所有工具箱項目。

GetToolboxItems(AssemblyName, Boolean)

回傳給定組裝的物件 an ICollectionToolboxItem 。

GetToolboxItems(AssemblyName)

回傳給定組裝的物件 an ICollectionToolboxItem 。

GetType()

取得目前實例的 Type。

(繼承來源 Object)
IsItemContainer(IDataObject, IDesignerHost)

回傳一個值,表示該資料物件是否代表項目容器。

IsItemContainerSupported(ToolboxItemContainer, IDesignerHost)

判斷工具箱物品容器是否由指定設計主機支援。

MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
Refresh()

刷新工具箱物品的狀態。

SelectedItemContainerUsed()

當使用者回報所選工具箱項目已被使用時,會接到工具箱服務的來電。

SetCursor()

將當前應用程式的游標設為代表當前選取工具的游標。

ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)
UnloadToolboxItems()

卸載因呼叫該 GetToolboxItems 方法而被鎖定的組件。

明確介面實作

名稱 Description
IComponentDiscoveryService.GetComponentTypes(IDesignerHost, Type)

取得可用元件類型清單。

IToolboxService.AddCreator(ToolboxItemCreatorCallback, String, IDesignerHost)

關於此成員的描述,請參見方法。AddCreator(ToolboxItemCreatorCallback, String, IDesignerHost)

IToolboxService.AddCreator(ToolboxItemCreatorCallback, String)

關於此成員的描述,請參見方法。AddCreator(ToolboxItemCreatorCallback, String)

IToolboxService.AddLinkedToolboxItem(ToolboxItem, IDesignerHost)

關於此成員的描述,請參見方法。AddLinkedToolboxItem(ToolboxItem, IDesignerHost)

IToolboxService.AddLinkedToolboxItem(ToolboxItem, String, IDesignerHost)

關於此成員的描述,請參見方法。AddLinkedToolboxItem(ToolboxItem, String, IDesignerHost)

IToolboxService.AddToolboxItem(ToolboxItem, String)

關於此成員的描述,請參見方法。AddToolboxItem(ToolboxItem, String)

IToolboxService.AddToolboxItem(ToolboxItem)

關於此成員的描述,請參見方法。AddToolboxItem(ToolboxItem)

IToolboxService.CategoryNames

關於此成員的描述,請參見 CategoryNames 該物業。

IToolboxService.DeserializeToolboxItem(Object, IDesignerHost)

關於此成員的描述,請參見方法。DeserializeToolboxItem(Object, IDesignerHost)

IToolboxService.DeserializeToolboxItem(Object)

關於此成員的描述,請參見方法。DeserializeToolboxItem(Object)

IToolboxService.GetSelectedToolboxItem()

關於此成員的描述,請參見方法。GetSelectedToolboxItem

IToolboxService.GetSelectedToolboxItem(IDesignerHost)

關於此成員的描述,請參見方法。GetSelectedToolboxItem(IDesignerHost)

IToolboxService.GetToolboxItems()

從工具箱裡取得整個工具箱的物品集合。

IToolboxService.GetToolboxItems(IDesignerHost)

從工具箱中取得與指定設計主機相關聯的工具箱項目集合。

IToolboxService.GetToolboxItems(String, IDesignerHost)

從工具箱中取得與指定設計師主機和類別相關聯的工具箱項目集合。

IToolboxService.GetToolboxItems(String)

從工具箱中取得符合指定類別的工具箱物品集合。

IToolboxService.IsSupported(Object, ICollection)

取得一個值,表示指定物件(代表序列化工具箱項目)是否符合指定屬性。

IToolboxService.IsSupported(Object, IDesignerHost)

會取得一個值,表示指定的物件(代表序列化工具箱項目)是否能被指定的設計主機使用。

IToolboxService.IsToolboxItem(Object, IDesignerHost)

透過指定的設計主機,取得指定物件是否為序列化工具箱項目的值。

IToolboxService.IsToolboxItem(Object)

會取得一個值,表示指定的物件是否為序列化工具箱項目。

IToolboxService.Refresh()

刷新工具箱物品的狀態。

IToolboxService.RemoveCreator(String, IDesignerHost)

移除先前新增的工具箱建立器,該工具箱與指定資料格式及設計器主機相關聯。

IToolboxService.RemoveCreator(String)

移除先前新增的指定資料格式工具箱項目創建器。

IToolboxService.RemoveToolboxItem(ToolboxItem, String)

從工具箱中移除指定的物品。

IToolboxService.RemoveToolboxItem(ToolboxItem)

從工具箱中移除指定的物品。

IToolboxService.SelectedCategory

關於此成員的描述,請參見 SelectedCategory 該物業。

IToolboxService.SelectedToolboxItemUsed()

通知工具箱服務所選工具已被使用。

IToolboxService.SerializeToolboxItem(ToolboxItem)

會取得一個可序列化的物件,代表指定的工具箱項目。

IToolboxService.SetCursor()

將當前應用程式的游標設為代表當前選取工具的游標。

IToolboxService.SetSelectedToolboxItem(ToolboxItem)

選擇指定的工具箱項目。

適用於

另請參閱