Exemplo n.º 1
0
 private void CreateSwitchOperationModeWin(ref PortManager target)
 {
     if (target != null)
     {
         if (!base.IsDisposed)
         {
             string str = target.comm.sourceDeviceName + ": Switch Operation Mode";
             frmSwitchOperationMode mode = new frmSwitchOperationMode(target.comm);
             mode.Text = str;
             mode.ShowDialog();
         }
         else
         {
             MessageBox.Show("Port not initialized!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
     }
 }
Exemplo n.º 2
0
 private void CreateSwitchOperationModeWin()
 {
     if (!base.IsDisposed)
     {
         string str = this.comm.sourceDeviceName + ": Switch Operation Mode";
         frmSwitchOperationMode mode = new frmSwitchOperationMode(this.comm);
         mode.Text = str;
         mode.ShowDialog();
     }
     else
     {
         MessageBox.Show("COM window not initialized!", "Information");
     }
 }
Exemplo n.º 3
0
 private void CreateSwitchOperationModeWin()
 {
     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 = "Switch Operation Mode: All";
             frmSwitchOperationMode mode = new frmSwitchOperationMode(manager.comm);
             mode.Text = str2;
             mode.ShowDialog();
         }
     }
 }