プロパティ: CommandList をCommands として (読み取り専用)
ディスパッチ ID: 1004
詳細:
このプロパティは、 XMLSpyControl を持つ定義された全てのコマンドのフラットリストを返します。メニュー構造に従い、コマンドを整理するには、 MainMenu を使用します。ツールバーコマンドを取得するには、Toolbars を使用します。
public void GetAllXmlSpyCommands()
{
// Get all commands from the XMLSpy ActiveX control assigned to the current form
XMLSpyControlLib.XMLSpyCommands commands = this.axXMLSpyControl1.CommandList;
// Iterate through all commands
for (int i = 0; i < commands.Count; i++)
{
// Get each command by index and output it to the console
XMLSpyControlLib.XMLSpyCommand cmd = axXMLSpyControl1.CommandList[i];
Console.WriteLine("{0} {1} {2}", cmd.ID, cmd.Name, cmd.Label.Replace("&", ""));
}
}
|
C# サンプル