/// <summary> /// Stops monitoring and reports finish state of the analysis. /// </summary> private void analysisFinished() { watch.Stop(); timer.IsEnabled = false; memoryText.Content = OutputUtils.GetMemoryText(GC.GetTotalMemory(true)); warningsTab.Visibility = System.Windows.Visibility.Visible; FlowDocumentOutput warningsOutput = new FlowDocumentOutput(warningsFlowDocument); warningsOutput.ClearDocument(); currentAnalyser.GenerateWarnings(warningsOutput); finalSnapshotTab.Visibility = System.Windows.Visibility.Visible; FlowDocumentOutput finalSnapshotOutput = new FlowDocumentOutput(finalSnapshotFlowDocument); finalSnapshotOutput.ClearDocument(); currentAnalyser.GenerateFinalSnapshotText(finalSnapshotOutput); if (currentAnalyser.EndState == AnalysisEndState.Success && isBenchmarkEnabled) { exportBenchmarkMenu.IsEnabled = true; } abortButton.IsEnabled = false; }
/// <summary> /// Initializes a new instance of the <see cref="MainWindow"/> class. /// </summary> public MainWindow() { InitializeComponent(); timer.Interval = TimeSpan.FromMilliseconds(500); timer.Tick += timer_Tick; analysisOutput = new FlowDocumentOutput(outputFlowDocument); // Shows start dialog if (!showStartAnalysisDialog()) { // If user closes the dialog then nothing to do - quit Close(); } }