private void OnRecvSimobjectData(SimConnect sender, SIMCONNECT_RECV_SIMOBJECT_DATA data) { try { Donnees = (DonneesAvion)data.dwData[0]; } catch (Exception e) { Console.WriteLine("OnRecvSimobjectData a échoué :" + e.Message); } }
public simulateur() { Donnees = new DonneesAvion(); m_bConnected = false; m_scThread = new Thread(new ThreadStart(ThreadProcedure)); m_scThread.IsBackground = true; m_scEvent = new EventWaitHandle(false, EventResetMode.AutoReset); m_scThreadRun = true; m_scThread.Start(); }