/// <summary> /// Displays the loaded analysis /// </summary> private void ShowLoadedAnalysis() { string message; var isRunning = StateModerator.IsAnalysisRunning(out message); if (isRunning) { StateModerator.CurrentViewState = ViewState.RunningAnalysisView; } else { StateModerator.CurrentAnalysisState = AnalysisState.Viewing; StateModerator.CurrentViewState = ViewState.AnalysisView; } }
/// <summary> /// Loads a recent analysis /// </summary> /// <param name="recentAnalysis"></param> private void LoadAnalysis(RecentAnalysis recentAnalysis) { string message; if (StateModerator.IsAnalysisRunning(out message)) { Status = "Cannot open a new analysis while one is running."; return; } var filename = Path.Combine(recentAnalysis.Path, recentAnalysis.Name); if (!File.Exists(filename)) { StateModerator.CurrentViewState = ViewState.HomeView; Status = "The analysis file does not exist"; return; } // Show the open view StateModerator.CurrentViewState = ViewState.OpenView; LoadingAnalysisViewModel.LoadAnalysis(recentAnalysis); }