在 Configuration Manager 中,若要在 Configuration Manager 控制台中显示对话框,请创建一个Configuration Manager ShowDialog作。 若要定义 ShowDialog 作,请创建一个描述 ActionDescription 元素的 XML 文件。
以下过程创建用于显示对话框的作 XML。 在完成此过程之前,必须完成“如何创建Configuration Manager对话框”和“如何为Configuration Manager对话框创建表单 XML”主题中的过程。
注意
对话框标识符<DialogId>必须与在“如何为Configuration Manager对话框创建表单 XML”中创建的表单 XML 的文件名(不含 XML 扩展名)匹配。
为对话框创建作
如果处于打开状态,请关闭Configuration Manager控制台。
在记事本中,创建包含以下 XML 的 XML 文件:
<ActionDescription Class="ShowDialog" DisplayName="Show my Dialog Box" MnemonicDisplayName="Mnemonic" Description="Description"> <ShowOn> <string>DefaultContextualTab</string> <!-- RIBBON --> <string>ContextMenu</string> <!-- Context Menu --> </ShowOn> <DialogId>ConfigMgrDialogControl</DialogId> </ActionDescription>将 XML 文件保存在文件夹 %ProgramFiles%\AdminUI\XmlStorage\Extensions\Actions\32815086-cce9-42de-95a4-0941da31114e 中。 GUID 值标识结果窗格中的包。 文件名可以是扩展名为 .xml 的任何内容。 请务必将文件保存为类型
All Files。启动Configuration Manager控制台,在控制台树“包”节点中,右键单击结果窗格中的包,然后单击“显示我的对话框”。 将出现一个对话框。
另请参阅
如何创建Configuration Manager对话框如何为Configuration Manager对话框创建表单 XML如何为Configuration Manager属性表创建作 XML如何使用传递给 的对象Configuration Manager Forms如何将Configuration Manager数据绑定到窗体