本文整理汇总了C#中DTE2.AddContextMenuItem方法的典型用法代码示例。如果您正苦于以下问题:C# DTE2.AddContextMenuItem方法的具体用法?C# DTE2.AddContextMenuItem怎么用?C# DTE2.AddContextMenuItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DTE2
的用法示例。
在下文中一共展示了DTE2.AddContextMenuItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnConnection
public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
_applicationObject = (DTE2)application;
_addInInstance = (AddIn)addInInst;
if (connectMode != ext_ConnectMode.ext_cm_UISetup) return;
_applicationObject.AddContextMenuItem(_addInInstance, new[] { LocationCodeWindow }, InsertGuidCommand, "Insert WiX Guid", 101, true, 1);
_applicationObject.AddContextMenuItem(_addInInstance, new[] { LocationCodeWindow }, InsertFileIdCommand, "Insert WiX Id", 101, false, 2);
_applicationObject.AddContextMenuItem(_addInInstance, new[] { LocationCodeWindow }, InsertShortFilenameCommand, "Insert WiX Short Filename", 101, false, 3);
_applicationObject.AddContextMenuItem(_addInInstance, new[] { LocationCodeWindow }, InsertDirectoryElementCommand, "Insert WiX Directory", 101, false, 4);
_applicationObject.AddContextMenuItem(_addInInstance, new[] { LocationCodeWindow }, InsertComponentElementCommand, "Insert WiX Component", 101, false, 5);
_applicationObject.AddContextMenuItem(_addInInstance, new[] { LocationCodeWindow }, InsertFileElementCommand, "Insert WiX File", 101, false, 6);
_applicationObject.AddContextMenuItem(_addInInstance, new[] { LocationCodeWindow }, InsertFileAndShortcutElementCommand, "Insert WiX File And Shortcut", 101, false, 7);
}