/// <summary> /// Find the DTE_Menu ( CommandBar ) within the DTE complex. /// </summary> /// <param name="InMenuName"></param> /// <returns></returns> public DTE_Menu FindMenu(string InMenuName) { CommandBars bars = (CommandBars)dte2.CommandBars; Microsoft.VisualStudio.CommandBars.CommandBar cmdBar = null; cmdBar = DTE_Common.FindCommandBar(dte2, InMenuName); return(new DTE_Menu(this, cmdBar)); }
/// <summary> /// construct a DTE_Menu from the sub menu contained by a CommandBarControl /// </summary> /// <param name="InMain"></param> /// <param name="InControl"></param> public DTE_Menu(DTE_Main InMain, CommandBarControl InParentMenuControl) { mMain = InMain; mParentMenuControl = InParentMenuControl; mBar = DTE_Common.ControlToCommandBar(mParentMenuControl); }