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

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