public void Dispose()
 {
     if (_simAdapter != null)
     {
         _simAdapter.Close();
         _simAdapter.Dispose();
         _simAdapter = null;
     }
 }
 public RacingDataModule()
 {
     _simAdapter = new _SimAdapter();
     _simAdapter.Show();
     _simAdapter.Hide();
     _simAdapter.simAdapterClientControl1.ConnectionAcknowledged += new EventHandler(_simClient_ConnectionAcknowledged);
     _simAdapter.simAdapterClientControl1.ConnectionDisconnected += new EventHandler(_simClient_ConnectionDisconnected);
     _simAdapter.simAdapterClientControl1.ConnectionRefused      += new EventHandler(_simClient_ConnectionRefused);
     _simAdapter.simAdapterClientControl1.CurrentSimChanged      += new EventHandler <SimChangedEventArgs>(_simClient_CurrentSimChanged);
     _simAdapter.simAdapterClientControl1.DataIntervalChanged    += new EventHandler <DataIntervalChangedEventArgs>(_simClient_DataIntervalChanged);
     _simAdapter.simAdapterClientControl1.ReceivingData          += new EventHandler <ReceivingDataEventArgs>(_simClient_ReceivingData);
     _simAdapter.simAdapterClientControl1.ServerNotFound         += new EventHandler(_simClient_ServerNotFound);
     _simAdapter.simAdapterClientControl1.WrongPassword          += new EventHandler(_simClient_WrongPassword);
 }