Пример #1
0
 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);
 }
Пример #2
0
 private void ShowContextMenu(Point point) {
     CookiecutterPackage.ShowContextMenu(
         new CommandID(PackageGuids.guidCookiecutterCmdSet, PackageIds.ContextMenu),
         (int)point.X,
         (int)point.Y,
         this
     );
 }
Пример #3
0
 /// <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;
 }
Пример #4
0
 /// <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;
 }
Пример #5
0
 /// <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;
 }