Exemplo n.º 1
0
 private void OnConnectClick()
 {
     //running the info channel in a new thread
     t = new Thread(() =>
     {
         //the purpose of this boolean is explained in Joystick.xaml.cs
         stop = false;
         model.StartInfoChannel();
         model.StartCommandsChannel();
         //now that both channels were established, treating the data received from the simulator
         model.TreatReceivedData();
     });
     t.Start();
 }