Example #1
0
 //Take step into simulation and update inbound and outbound plane lists.
 private void btnStep_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         m_ATCBiz.Step();
         updateInOutbound();
     }
     catch (FaultException ex) //SOAP fault.
     {
         System.Diagnostics.Debug.WriteLine(ex.Message);
         MessageBox.Show("Communication error, cannot continue at this time.");
     }
     catch (CommunicationException ex) //Communication error.
     {
         System.Diagnostics.Debug.WriteLine(ex.Message);
         MessageBox.Show("Can't connect to Server");
     }
     catch (TimeoutException ex) //Server likely has died or halted.
     {
         System.Diagnostics.Debug.WriteLine(ex.Message);
         MessageBox.Show("Server timed out");
     }
     catch (Exception ex) //Generic exception for unknown problem.
     {
         System.Diagnostics.Debug.WriteLine("Exception type: " + ex.GetType());
         System.Diagnostics.Debug.WriteLine("Exception message: " + ex.Message);
         MessageBox.Show("Unexpected error, cannot continue at this time.");
     }
 }