protected override void Initialize() { base.Initialize(); expressionGraph = new ExpressionGraph(); applicationObject = (DTE2)GetService(typeof(DTE)); debuggerEvents = applicationObject.Events.DebuggerEvents; debuggerEvents.OnEnterBreakMode += DebuggerEvents_OnEnterBreakMode; debuggerEvents.OnEnterDesignMode += DebuggerEvents_OnEnterDesignMode; // Add our command handlers for menu (commands must exist in the .vsct file) OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if ( null != mcs ) { // Create the command for the tool window CommandID toolwndCommandID = new CommandID(GuidList.guidCommandTargetRGBCmdSet, (int)PkgCmdIDList.cmdidShowToolWindow); MenuCommand menuToolWin = new MenuCommand(ShowToolWindow, toolwndCommandID); mcs.AddCommand(menuToolWin); } }
protected override void Initialize() { base.Initialize(); expressionGraph = new ExpressionGraph(); applicationObject = (DTE2)GetService(typeof(DTE)); debuggerEvents = applicationObject.Events.DebuggerEvents; debuggerEvents.OnEnterBreakMode += DebuggerEvents_OnEnterBreakMode; debuggerEvents.OnEnterDesignMode += DebuggerEvents_OnEnterDesignMode; // Add our command handlers for menu (commands must exist in the .vsct file) OleMenuCommandService mcs = GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (null != mcs) { // Create the command for the tool window CommandID toolwndCommandID = new CommandID(GuidList.guidCommandTargetRGBCmdSet, (int)PkgCmdIDList.cmdidShowToolWindow); MenuCommand menuToolWin = new MenuCommand(ShowToolWindow, toolwndCommandID); mcs.AddCommand(menuToolWin); } }