Пример #1
0
        private static void Execute(object sender, EventArgs e)
        {
            var project = GlobalServices.get_current_project();

            if (project is IProjectManager)
            {
                Guid guid = Guid.Empty;
                int  result;
                ErrorHandler.ThrowOnFailure(GlobalServices.shell.ShowMessageBox(0, ref guid,
                                                                                null,
                                                                                disable_warning,
                                                                                null,
                                                                                0,
                                                                                OLEMSGBUTTON.OLEMSGBUTTON_OKCANCEL,
                                                                                OLEMSGDEFBUTTON.OLEMSGDEFBUTTON_SECOND,
                                                                                OLEMSGICON.OLEMSGICON_WARNING,
                                                                                0,
                                                                                out result));
                if (result == NativeMethods.IDOK)
                {
                    ModifyProject(project, disable_extender);
                }
            }
            else
            {
                ModifyProject(project, enable_extender);
            }
        }
Пример #2
0
        private static void Execute(object sender, EventArgs e)
        {
            var project = GlobalServices.get_current_project();

            if (project != null)
            {
                ((IProjectManager)project).Refresh();
            }
        }
Пример #3
0
 /// <summary>
 /// Modifies caption on the project extender command
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void QueryStatus(object sender, EventArgs e)
 {
     if (GlobalServices.get_current_project() is IProjectManager)
     {
         ((OleMenuCommand)sender).Text = disable_extender_text;
     }
     else
     {
         ((OleMenuCommand)sender).Text = enable_extender_text;
     }
 }
Пример #4
0
 void QueryStatus(object sender, EventArgs e)
 {
     Visible = GlobalServices.get_current_project() is IProjectManager;
 }