Esempio n. 1
0
 private void CreateModeMaskWin(ref PortManager target)
 {
     if (target != null)
     {
         if (!base.IsDisposed)
         {
             string str = target.comm.sourceDeviceName + ": Mode Mask";
             frmMaskMode mode = new frmMaskMode(target.comm);
             mode.Text = str;
             mode.ShowDialog();
         }
         else
         {
             MessageBox.Show("Port not initialized!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
     }
 }
Esempio n. 2
0
 private void CreateModeMaskWin()
 {
     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 = "Mode Mask: All";
             frmMaskMode mode = new frmMaskMode(manager.comm);
             mode.Text = str2;
             mode.ShowDialog();
         }
     }
 }