Example #1
0
 public RecipeMenuCommand(Configuration.Recipe recipe, GuidancePackage guidancePackage,
                          Microsoft.Practices.ComponentModel.ServiceContainer serviceProvider, CommandID commandId)
     : base(guidancePackage, serviceProvider, commandId)
 {
     if (recipe == null)
     {
         throw new ArgumentNullException("recipe");
     }
     this.recipe = recipe;
     this.Text   = recipe.Caption;
 }
Example #2
0
 public AssetMenuCommand(GuidancePackage guidancePackage,
                         Microsoft.Practices.ComponentModel.ServiceContainer serviceProvider, CommandID commandId)
     : base(null, commandId)
 {
     if (serviceProvider == null || guidancePackage == null || commandId == null)
     {
         throw new ArgumentNullException("RecipeMenuCommand");
     }
     this.serviceProvider    = serviceProvider;
     this.guidancePackage    = guidancePackage;
     this.Supported          = true;
     this.Visible            = true;
     this.Enabled            = true;
     this.BeforeQueryStatus += new EventHandler(OnBeforeQueryStatus);
 }
Example #3
0
        public TemplateMenuCommand(IVsTemplate template, GuidancePackage guidancePackage, Microsoft.Practices.ComponentModel.ServiceContainer serviceProvider)
            : base(guidancePackage, serviceProvider, template.Command)
        {
            this.template = template;
            string templateMenuName = String.Format(
                CultureInfo.CurrentCulture,
                Microsoft.Practices.RecipeFramework.VisualStudio.Properties.Resources.Templates_ContextMenu,
                this.template.Name);

            this.Text = templateMenuName;
        }