Esempio n. 1
0
 public void CurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e)
 {
     CloseProject();
     if (e.NewProject != null)
     {
         BindProject(e.NewProject);
         if (e.NewProject.ProjectFile != null && e.NewProject.ProjectFile.Exists &&
             File.Exists(UserFileForProjectFile(e.NewProject.ProjectFile.FullName)))
         {
             LoadProjectLayout(UserFileForProjectFile(e.NewProject.ProjectFile.FullName));
         }
         else
         {
             if (Current.Project.LatestVersion.PIMDiagrams.Count > 0)
             {
                 DiagramTabManager.ActivateDiagram(Current.Project.LatestVersion.PIMDiagrams[0]);
             }
             if (Current.Project.LatestVersion != null)
             {
                 DiagramTabManager.OpenTabsForProjectVersion(Current.Project.LatestVersion);
             }
         }
     }
     Current.ExecutedCommand += ReportDisplay.ExecutedCommand;
 }
Esempio n. 2
0
 void Current_ProjectChanged(object sender, CurrentProjectChangedEventArgs e)
 {
     if (e.OldController != null)
     {
         e.OldController.ExecutedCommand -= Controller_ExecutedCommand;
     }
     if (e.NewController != null)
     {
         e.NewController.ExecutedCommand += Controller_ExecutedCommand;
     }
 }
Esempio n. 3
0
 void CurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e)
 {
     if (e.OldProject != null)
     {
         e.OldProject.PropertyChanged -= Project_PropertyChanged;
     }
     if (e.NewProject != null)
     {
         e.NewProject.PropertyChanged += Project_PropertyChanged;
     }
     OnCanExecuteChanged(e);
 }
Esempio n. 4
0
        private void HandleCurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e)
        {
            if (e.OldProject != null)
            {
                e.OldProject.Loaded   -= HandleProjectLoaded;
                e.OldProject.Unloaded -= HandleProjectUnloaded;
            }

            if (e.NewProject != null)
            {
                e.NewProject.Loaded   += HandleProjectLoaded;
                e.NewProject.Unloaded += HandleProjectUnloaded;
            }

            OnChanged();
        }
        private void HandleCurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e)
        {
            if (projectContext != null)
            {
                projectContext.Loaded   -= HandleProjectLoaded;
                projectContext.Unloaded -= HandleProjectUnloaded;
            }

            projectContext = e.NewProject;

            if (e.NewProject != null)
            {
                projectContext.Loaded   += HandleProjectLoaded;
                projectContext.Unloaded += HandleProjectUnloaded;
            }

            OnCanExecuteChanged();
        }
Esempio n. 6
0
 void Current_ProjectChanged(object sender, CurrentProjectChangedEventArgs e)
 {
     OnCanExecuteChanged(e);
 }
Esempio n. 7
0
 private void HandleCurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e)
 {
     OnCanExecuteChanged();
 }
Esempio n. 8
0
        private void HandleCurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e)
        {
            projectContext = e.NewProject;

            OnCanExecuteChanged();
        }
Esempio n. 9
0
 private void HandleCurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e)
 {
     SelectedProject = Projects.FirstOrDefault(x => x.ProjectContext == e.NewProject);
 }