private DialogResult createSwitchProtocolWindow(ref CommunicationManager comm) { if ((comm != null) && comm.IsSourceDeviceOpen()) { frmSwitchProtocol protocol = new frmSwitchProtocol(comm); return protocol.ShowDialog(); } return DialogResult.Cancel; }
private DialogResult createSwitchProtocolWindow() { if ((this.comm != null) && this.IsSourceDeviceOpen()) { frmSwitchProtocol protocol = new frmSwitchProtocol(this.comm); return protocol.ShowDialog(); } return DialogResult.Cancel; }
private DialogResult createSwitchProtocolWindow() { DialogResult cancel = System.Windows.Forms.DialogResult.Cancel; if (PortManagerHash.Count > 0) { bool flag = false; PortManager manager = null; foreach (string str in PortManagerHash.Keys) { manager = (PortManager) PortManagerHash[str]; if (((manager != null) && manager.comm.IsSourceDeviceOpen()) && (manager.comm.ProductFamily == CommonClass.ProductType.GSD4e)) { flag = true; break; } } if (flag && (manager != null)) { string str2 = "Switch Protocol: All"; if ((manager.comm != null) && manager.comm.IsSourceDeviceOpen()) { frmSwitchProtocol protocol = new frmSwitchProtocol(manager.comm); protocol.Text = str2; cancel = protocol.ShowDialog(); } } } return cancel; }