public void InitializeConnection()
 {
     try
     {
         UpdateStatus(DeviceState.Connecting);
         communicator.InitializeConnection(true);
         UpdateStatus(DeviceState.Connected);
     }
     catch (Exception)
     {
         UpdateStatus(DeviceState.Initialized);
         if (Media != null)
         {
             Media.Close();
         }
         throw;
     }
 }
Beispiel #2
0
 public void InitializeConnection()
 {
     try
     {
         UpdateStatus(DeviceState.Connecting);
         communicator.InitializeConnection();
         UpdateStatus(DeviceState.Connected);
     }
     catch (Exception Ex)
     {
         UpdateStatus(DeviceState.Initialized);
         if (Media != null)
         {
             Media.Close();
             if (Media is GXSerial)
             {
                 Media.Settings = StartMediaSettings;
             }
         }
         throw Ex;
     }
 }