Commands2 接口
包含环境中的所有命令(以 Command 对象的形式)。
命名空间: EnvDTE80
程序集: EnvDTE80(在 EnvDTE80.dll 中)
语法
声明
<GuidAttribute("7EAA857B-2356-494B-9E13-0F6EEFA86E43")> _
Public Interface Commands2 _
Inherits Commands
[GuidAttribute("7EAA857B-2356-494B-9E13-0F6EEFA86E43")]
public interface Commands2 : Commands
[GuidAttribute(L"7EAA857B-2356-494B-9E13-0F6EEFA86E43")]
public interface class Commands2 : Commands
[<GuidAttribute("7EAA857B-2356-494B-9E13-0F6EEFA86E43")>]
type Commands2 =
interface
interface Commands
end
public interface Commands2 extends Commands
Commands2 类型公开以下成员。
属性
名称 | 说明 | |
---|---|---|
Count | 获取一个值,该值指示 Commands 集合中对象的数目。 | |
DTE | 获取顶级扩展性对象。 | |
Parent | 获取 Commands 集合的直接父对象。 |
页首
方法
名称 | 说明 | |
---|---|---|
Add | 基础结构。 仅由 Microsoft 内部使用。 | |
AddCommandBar | 创建一个命令栏,该命令栏被保存并且在下次启动环境时可用。 | |
AddNamedCommand | 创建命名命令,该命令由环境保存,并且在下次环境启动时(无论是否加载外接程序)可用。 | |
AddNamedCommand2 | 创建命名命令,该命令由环境保存,并且在下次环境启动时(无论是否加载外接程序)可用。 | |
CommandInfo | 返回与给定 CommandBar 控件关联的命令 GUID 和 ID。 | |
GetEnumerator | 获取 Commands 集合中项的枚举器。 | |
Item | 返回集合的索引成员。 | |
Raise | 执行指定的命令。 | |
RemoveCommandBar | 移除用 AddCommandBar 方法创建的命令栏。 | |
UpdateCommandUI | 强制刷新命令 UI 状态。 |
页首