Exemplo n.º 1
0
 private void OnClosing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     try
     {
         if (editor.RequestCloseAll() == false)
         {
             e.Cancel = true;
         }
     }
     catch (Exception)
     {
         e.Cancel = true;
     }
 }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
        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();
        }