示例#1
0
        private void Project_ProjectChanged(object o, ProjectEventArgs e)
        {
            MessageBoxResult messageBoxResult;

            if (this.IsDisposed)
            {
                return;
            }
            if (e.Project == null)
            {
                return;
            }
            string projectChangedDialogMessage = StringTable.ProjectChangedDialogMessage;
            string path = e.Project.DocumentReference.Path;

            if (!SolutionBase.IsReloadPromptEnabled())
            {
                messageBoxResult = MessageBoxResult.Yes;
            }
            else
            {
                MessageBoxArgs messageBoxArg        = new MessageBoxArgs();
                CultureInfo    currentCulture       = CultureInfo.CurrentCulture;
                object[]       shortApplicationName = new object[] { path, this.Services.ExpressionInformationService().ShortApplicationName };
                messageBoxArg.Message = string.Format(currentCulture, projectChangedDialogMessage, shortApplicationName);
                messageBoxArg.Button  = MessageBoxButton.YesNo;
                messageBoxArg.Image   = MessageBoxImage.Exclamation;
                MessageBoxArgs messageBoxArg1 = messageBoxArg;
                messageBoxResult = this.Services.MessageDisplayService().ShowMessage(messageBoxArg1);
            }
            if (messageBoxResult == MessageBoxResult.Yes)
            {
                IProject project = e.Project;
                if (project != null && this.Save(false) && this.RefreshProject(project) && this.Services.ProjectManager().ItemSelectionSet.Count == 0)
                {
                    this.Services.ProjectManager().ItemSelectionSet.SetSelection(this);
                }
            }
        }
示例#2
0
 private void OnProjectOpened(ProjectEventArgs e)
 {
     ((ProjectManager)this.Services.ProjectManager()).OnProjectOpened(e);
 }
示例#3
0
 internal void OnProjectClosed(ProjectEventArgs e)
 {
     ((ProjectManager)this.Services.ProjectManager()).OnProjectClosed(e);
 }