Esempio n. 1
0
 public void CheckConnection()
 {
     if (m_obdInterface.getConnectedStatus())
     {
         groupDisplay.Enabled    = true;
         groupSelections.Enabled = true;
         groupLogging.Enabled    = true;
         if (bLogging)
         {
             btnStart.Enabled = false;
             btnStart.Text    = "R&esume";
             btnReset.Enabled = true;
             btnSave.Enabled  = true;
         }
         else
         {
             btnStart.Enabled    = true;
             btnStart.Text       = "S&tart";
             listSensors.Enabled = true;
             btnReset.Enabled    = false;
             btnSave.Enabled     = false;
         }
         listSensors.Items.Clear();
         IEnumerator enumerator = m_obdInterface.getSupportedParameterList(1).GetEnumerator();
         if (!enumerator.MoveNext())
         {
             return;
         }
         do
         {
             ((ListBox.ObjectCollection)listSensors.Items).Add(enumerator.Current);
         }while (enumerator.MoveNext());
     }
     else
     {
         listSensors.Items.Clear();
         groupDisplay.Enabled    = false;
         groupSelections.Enabled = false;
         groupLogging.Enabled    = false;
     }
 }