Exemple #1
0
 private void CreatePowerMaskWin(ref PortManager target)
 {
     if (target != null)
     {
         if (!base.IsDisposed)
         {
             string str = target.comm.sourceDeviceName + ": Power Mask";
             frmMaskPower power = new frmMaskPower(target.comm);
             power.Text = str;
             power.ShowDialog();
         }
         else
         {
             MessageBox.Show("Port not initialized!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
     }
 }
Exemple #2
0
 private void CreatePowerMaskWin()
 {
     if (PortManagerHash.Count > 0)
     {
         PortManager manager = null;
         bool flag = false;
         foreach (string str in PortManagerHash.Keys)
         {
             manager = (PortManager) PortManagerHash[str];
             if ((manager != null) && manager.comm.IsSourceDeviceOpen())
             {
                 flag = true;
                 break;
             }
         }
         if (flag && (manager != null))
         {
             string str2 = "Power Mask: All";
             frmMaskPower power = new frmMaskPower(manager.comm);
             power.Text = str2;
             power.ShowDialog();
         }
     }
 }