Example #1
0
 private void OnDisconnectClick()
 {
     stop = true;
     //gracefully closing the connection and the info channel thread
     model.Stop();
     if (t.IsAlive)
     {
         if (t != Thread.CurrentThread)
         {
             t.Join();
         }
     }
     Debug.WriteLine("The thread of info channel has successfully finished");
     model.Disconnect();
     Debug.WriteLine("Successfully disconnected both channels");
 }
Example #2
0
 private void OnDisconnect()
 {
     model.Disconnect();
 }
Example #3
0
 /* terminates the connection with the Flight Simulator.
  * will be used when the user will exit the main window. */
 public void Dissconnect(object sender, EventArgs e)
 {
     model.Disconnect();
 }