Exemplo n.º 1
0
 private void setEEClickHandler()
 {
     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)) && manager.comm.IsSourceDeviceOpen())
         {
             string str2 = "Set EE: All";
             frmEE mee = new frmEE(manager.comm);
             mee.Text = str2;
             mee.ShowDialog();
         }
     }
 }
Exemplo n.º 2
0
 private void setCGEEClickHandler(ref CommunicationManager comm)
 {
     if (comm != null)
     {
         if (!base.IsDisposed)
         {
             string str = comm.sourceDeviceName + ": Set EE";
             frmEE mee = new frmEE(comm);
             mee.Text = str;
             mee.ShowDialog();
         }
         else
         {
             MessageBox.Show("Port not initialized!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
     }
 }