private void btnDiagnostics_Click(object sender, RoutedEventArgs e) { if (_diagnosticsWindow == null) { _diagnosticsWindow = new DiagnosticsWindow(_viewModel.GetDiagnosticWindowViewModel()); _diagnosticsWindow.Closing += _diagnosticsWindow_Closing; } _diagnosticsWindow.Show(); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (_diagnosticsWindow != null) { _diagnosticsWindow.Close(); _diagnosticsWindow = null; } Properties.Settings.Default.ShowHelpAtStart = chkShowStartup.IsChecked.Value; Properties.Settings.Default.Save(); }
void _diagnosticsWindow_Closing(object sender, CancelEventArgs e) { _diagnosticsWindow = null; }