private void OnClosing(object sender, System.ComponentModel.CancelEventArgs e) { try { if (editor.RequestCloseAll() == false) { e.Cancel = true; } } catch (Exception) { e.Cancel = true; } }
private void OnClosing(object sender, System.ComponentModel.CancelEventArgs e) { try { if (editor.RequestCloseAll() == false) { e.Cancel = true; } } catch (Exception err) { GUIUtilities.ReportUnexpectedException(err); e.Cancel = true; } }
private void OnClosing(object sender, System.ComponentModel.CancelEventArgs e) { try { if (editor.RequestCloseAll() == false) { e.Cancel = true; } } catch (Exception err) { GUIUtilities.ReportUnexpectedException(err); e.Cancel = true; return; } this.IsEnabled = false; Window closing = new ClosingWindow(); closing.Show(); try { controlPanel.Dispose(); } catch (Exception err) { GUIUtilities.ReportUnexpectedException(err); } try { commandWindow.Dispose(); } catch (Exception err) { GUIUtilities.ReportUnexpectedException(err); } try { webcamDisplay.Dispose(); } catch (Exception err) { GUIUtilities.ReportUnexpectedException(err); } try { simDisplay.Dispose(); } catch (Exception err) { GUIUtilities.ReportUnexpectedException(err); } try { Robot.Shutdown(); } catch (Exception err) { GUIUtilities.ReportUnexpectedException(err); } closing.Close(); }