/// <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 initilaization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            MyLog.DebugEnter(this, "Initialize()");

            base.Initialize();

            // TODO:(pv) Since crawling starts post-reviewing in the background, we may need to test for post-review
            // and notify user if we cannot find it in the path...or if there is any other error while crawling.
            // This may not be necessary if the crawler properly reports error back to VS

            // solutionTracker constructor subscribes to Solution events and starts crawling a solution after it is opened
            solutionTracker = new MySolutionTracker(this, BackgroundInitialSolutionCrawl_RunWorkerCompleted);

            OleMenuCommandService mcs = GetService <IMenuCommandService>() as OleMenuCommandService;

            if (null != mcs)
            {
                // Define commands ids as unique Guid/integer pairs...
                CommandID idReviewBoard = new CommandID(MyPackageConstants.CommandSetIdGuid, MyPackageCommandIds.cmdIdReviewBoard);

                // Define the menu command callbacks...
                OleMenuCommand commandReviewBoard = new OleMenuCommand(new EventHandler(ReviewBoardCommand), idReviewBoard);

                // TODO:(pv) Only display ReviewBoard if svn status says selected item(s) have been changed
                commandReviewBoard.BeforeQueryStatus += new EventHandler(commandReviewBoard_BeforeQueryStatus);

                // Add the menu commands to the command service...
                mcs.AddCommand(commandReviewBoard);
            }

            MyLog.DebugLeave(this, "Initialize()");
        }
        /// <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 initilaization code that rely on services provided by VisualStudio.
        /// </summary>
        protected override void Initialize()
        {
            MyLog.DebugEnter(this, "Initialize()");

            base.Initialize();

            // TODO:(pv) Since crawling starts post-reviewing in the background, we may need to test for post-review
            // and notify user if we cannot find it in the path...or if there is any other error while crawling.
            // This may not be necessary if the crawler properly reports error back to VS

            // solutionTracker constructor subscribes to Solution events and starts crawling a solution after it is opened
            solutionTracker = new MySolutionTracker(this, BackgroundInitialSolutionCrawl_RunWorkerCompleted);

            OleMenuCommandService mcs = GetService<IMenuCommandService>() as OleMenuCommandService;
            if (null != mcs)
            {
                // Define commands ids as unique Guid/integer pairs...
                CommandID idReviewBoard = new CommandID(MyPackageConstants.CommandSetIdGuid, MyPackageCommandIds.cmdIdReviewBoard);

                // Define the menu command callbacks...
                OleMenuCommand commandReviewBoard = new OleMenuCommand(new EventHandler(ReviewBoardCommand), idReviewBoard);

                // TODO:(pv) Only display ReviewBoard if svn status says selected item(s) have been changed
                commandReviewBoard.BeforeQueryStatus += new EventHandler(commandReviewBoard_BeforeQueryStatus);

                // Add the menu commands to the command service...
                mcs.AddCommand(commandReviewBoard);
            }

            MyLog.DebugLeave(this, "Initialize()");
        }
Esempio n. 3
0
        public FormSubmit(MySolutionTracker.SubmitItemMap.ValueCollection solutionChanges)
        {
            InitializeComponent();

            if (solutionChanges == null)
            {
                throw new ArgumentNullException("solutionChanges");
            }

            this.solutionChanges = solutionChanges;
        }