Esempio n. 1
0
        /// <summary>
        /// This function is the callback used to execute the command when the menu item is clicked.
        /// See the constructor to see how the menu item is associated with this function using
        /// OleMenuCommandService service and MenuCommand class.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event args.</param>
        protected override void MenuItemCallback(object sender, EventArgs e)
        {
            base.PreMenuItemCallback();

            m_solutionBrowser.CheckOutProjectVersionFiles(m_solutionBrowser.ProjectsToUpdate);
            SetupProjectsLoader spl = new SetupProjectsLoader(m_devEnvApplicationObject);

            spl.UnloadSetupProjects(m_solutionBrowser.ProjectsToUpdate);
            m_solutionBrowser.SaveVersions();
            spl.ReloadSetupProjects();

            bool runCommand = true;

            if (m_solutionBrowser.UpdateSummary.UpdatedItemsCount == 0)
            {
                runCommand = NoUpdateForm.Show(new WindowAdapter(m_devEnvApplicationObject.MainWindow.HWnd)) == DialogResult.Yes;
            }

            if (runCommand)
            {
                m_devEnvApplicationObject.ExecuteCommand("Build.RebuildSolution", "");
            }

            if (m_solutionBrowser.UpdateSummary.UpdatedItemsCount > 0 && ConfigurationPersister.Instance.Configuration.DisplayOptions.ShowSuccessDialog)
            {
                OperationSuccesForm.Show(new WindowAdapter(m_devEnvApplicationObject.MainWindow.HWnd), m_solutionBrowser.UpdateSummary.SummaryItems);
            }
        }
Esempio n. 2
0
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword
        public static DialogResult Show(IWin32Window owner)
        {
#pragma warning restore CS0108 // Member hides inherited member; missing new keyword
            NoUpdateForm nuf = new NoUpdateForm();
            nuf.StartPosition = FormStartPosition.CenterParent;
            return(nuf.ShowDialog(owner));
        }