private void CreateNavModeControlWin(ref PortManager target) { if (target != null) { if (!base.IsDisposed) { string str = target.comm.sourceDeviceName + ": Nav Mode Control"; frmSetGPSDRMode mode = new frmSetGPSDRMode(target.comm); mode.Text = str; mode.ShowDialog(); } else { MessageBox.Show("Port not initialized!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); } } }
private void CreateNavModeControlWin() { 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 = ": DR Nav Mode Control"; frmSetGPSDRMode mode = new frmSetGPSDRMode(manager.comm); mode.Text = str2; mode.ShowDialog(); } } }