private void Visualizer_Closed(object sender, EventArgs e) { try { _visualizer = null; } catch (Exception ex) { MessageBox.Show(ex.ToString(), this.Title, MessageBoxButton.OK, MessageBoxImage.Error); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { try { // Visualizer _visualizer = new OCRTestDataVisualizer(); _visualizer.Closed += Visualizer_Closed; _visualizer.Top = this.Top; _visualizer.Left = this.Left + this.ActualWidth; _visualizer.Show(); // Load the last saved session TryLoadSession(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), this.Title, MessageBoxButton.OK, MessageBoxImage.Error); } }