Exemple #1
0
 public void ShowContextMenu(AnkhCommandMenu menu, System.Drawing.Point location)
 {
     ShowContextMenu(menu, location.X, location.Y);
 }
Exemple #2
0
        public void ShowContextMenu(AnkhCommandMenu menu, int x, int y)
        {
            IMenuCommandService mcs = GetService<IMenuCommandService>();

            IVsUIShell shell = GetService<IVsUIShell>();
            if (mcs != null)
            {
                try
                {
                    mcs.ShowContextMenu(new CommandID(AnkhId.CommandSetGuid, (int)menu), x, y);
                }
                catch (COMException)
                {
                    /* Menu is not declared correctly (no items) */
                }
            }
        }