public PlanWorkItemNavigationItem([Import(typeof(SVsServiceProvider))]IServiceProvider serviceProvider) : base(serviceProvider)
        {
            this.Text = TFSScrumExtensions.Resources.PlanWorkItem_TeamExplorer_Home;
            this.Image = TFSScrumExtensions.Resources.PlanWorkItemNavigationItem;

            PlanWorkItemController controller = new PlanWorkItemController();
            controller.TeamFoundationProjectChanged += controller_TeamFoundationProjectChanged;

            this.IsVisible = controller.IsConnected();
        }
예제 #2
0
        public PlanWorkItemNavigationItem([Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider) : base(serviceProvider)
        {
            this.Text  = TFSScrumExtensions.Resources.PlanWorkItem_TeamExplorer_Home;
            this.Image = TFSScrumExtensions.Resources.PlanWorkItemNavigationItem;

            PlanWorkItemController controller = new PlanWorkItemController();

            controller.TeamFoundationProjectChanged += controller_TeamFoundationProjectChanged;

            this.IsVisible = controller.IsConnected();
        }
        /// <summary>
        /// Executes this instance.
        /// </summary>
        public override void Execute()
        {
            try
            {
                TFSScrumExtensions.TFSScrumExtensionsPackage.InternalInitialize();

                PlanWorkItemController controller = new PlanWorkItemController();
                controller.OnPlanWorkItem(new int[] { }, false);
            }
            catch (Exception ex)
            {
                this.ShowNotification(ex.Message, NotificationType.Error);
            }
        }
예제 #4
0
        /// <summary>
        /// Executes this instance.
        /// </summary>
        public override void Execute()
        {
            try
            {
                TFSScrumExtensions.TFSScrumExtensionsPackage.InternalInitialize();

                PlanWorkItemController controller = new PlanWorkItemController();
                controller.OnPlanWorkItem(new int[] { }, false);
            }
            catch (Exception ex)
            {
                this.ShowNotification(ex.Message, NotificationType.Error);
            }
        }
 private void controller_TeamFoundationProjectChanged(object sender, EventArgs e)
 {
     PlanWorkItemController controller = new PlanWorkItemController();
     this.IsVisible = controller.IsConnected();
 }
        /// <summary>
        /// Initialization of the package; this method is called right after the package is sited, so this is the place
        /// where you can put all the initialization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            Debug.WriteLine (string.Format(CultureInfo.CurrentCulture, "Entering Initialize() of: {0}", this.ToString()));
            base.Initialize();

            InternalInitialize();

            #region PlanWorkItemController

            PlanWorkItemController planWorkItemController = new PlanWorkItemController();

            // Add our command handlers for menu (commands must exist in the .vsct file)
            OleMenuCommandService mcs = this.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            if (null != mcs)
            {
                // Create the command for the menu item.
                CommandID menuCommandID = new CommandID(GuidList.guidTFSScrumExtensionsCmdSet, (int)PkgCmdIDList.cmdPlanWorkItem);
                MenuCommand menuItem = new MenuCommand(planWorkItemController.OnPlanWorkItem, menuCommandID);
                mcs.AddCommand(menuItem);
            }

            #endregion
        }
예제 #7
0
        private void controller_TeamFoundationProjectChanged(object sender, EventArgs e)
        {
            PlanWorkItemController controller = new PlanWorkItemController();

            this.IsVisible = controller.IsConnected();
        }