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; }
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; } }
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); }
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(); }
void Current_ProjectChanged(object sender, CurrentProjectChangedEventArgs e) { OnCanExecuteChanged(e); }
private void HandleCurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e) { OnCanExecuteChanged(); }
private void HandleCurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e) { projectContext = e.NewProject; OnCanExecuteChanged(); }
private void HandleCurrentProjectChanged(object sender, CurrentProjectChangedEventArgs e) { SelectedProject = Projects.FirstOrDefault(x => x.ProjectContext == e.NewProject); }