Exemplo n.º 1
0
 private void CreateSetPollGenericSensorParamWin(ref PortManager target)
 {
     if (target != null)
     {
         if (!base.IsDisposed)
         {
             string str = target.comm.sourceDeviceName + ": Set/Poll Generic Sensor Parameters";
             frmDRSetPollGenericSensParams @params = new frmDRSetPollGenericSensParams(target.comm);
             @params.Text = str;
             @params.ShowDialog();
         }
         else
         {
             MessageBox.Show("Port not initialized!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
     }
 }
Exemplo n.º 2
0
 private void CreateSetPollGenericSensorParamWin()
 {
     if (PortManagerHash.Count > 0)
     {
         PortManager manager = null;
         bool flag = false;
         foreach (string str in PortManagerHash.Keys)
         {
             if (!(str == clsGlobal.FilePlayBackPortName))
             {
                 manager = (PortManager) PortManagerHash[str];
                 if ((manager != null) && manager.comm.IsSourceDeviceOpen())
                 {
                     flag = true;
                     break;
                 }
             }
         }
         if (flag && (manager != null))
         {
             string str2 = "Set/Poll Generic Sensor Parameters";
             frmDRSetPollGenericSensParams @params = new frmDRSetPollGenericSensParams(manager.comm);
             @params.Text = str2;
             @params.ShowDialog();
         }
     }
 }