コード例 #1
0
        /// <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;
            }
        }
コード例 #2
0
        /// <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);
        }