internal static void ShowContextMenu(CommandID commandId, int x, int y, IOleCommandTarget commandTarget) { var shell = CookiecutterPackage.GetGlobalService(typeof(SVsUIShell)) as IVsUIShell; var pts = new POINTS[1]; pts[0].x = (short)x; pts[0].y = (short)y; shell.ShowContextMenu(0, commandId.Guid, commandId.ID, pts, commandTarget); }
private void ShowContextMenu(Point point) { CookiecutterPackage.ShowContextMenu( new CommandID(PackageGuids.guidCookiecutterCmdSet, PackageIds.ContextMenu), (int)point.X, (int)point.Y, this ); }
/// <summary> /// Default constructor of the package. /// Inside this method you can place any initialization code that does not require /// any Visual Studio service because at this point the package object is created but /// not sited yet inside Visual Studio environment. The place to do all the other /// initialization is the Initialize method. /// </summary> public CookiecutterPackage() { Trace.WriteLine("Entering constructor for: {0}".FormatInvariant(this)); Instance = this; }
/// <summary> /// Default constructor of the package. /// Inside this method you can place any initialization code that does not require /// any Visual Studio service because at this point the package object is created but /// not sited yet inside Visual Studio environment. The place to do all the other /// initialization is the Initialize method. /// </summary> public CookiecutterPackage() { Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering constructor for: {0}", this.ToString())); Instance = this; }
/// <summary> /// Default constructor of the package. /// Inside this method you can place any initialization code that does not require /// any Visual Studio service because at this point the package object is created but /// not sited yet inside Visual Studio environment. The place to do all the other /// initialization is the Initialize method. /// </summary> public CookiecutterPackage() { Trace.WriteLine(string.Format(CultureInfo.CurrentCulture, "Entering constructor for: {0}", this.ToString())); Instance = this; }