public void DisconnectPort() { this.StopAsyncProcess(); this._isIdle = true; string text1 = "Main " + this.comm.PortName + ": Idle"; if (this._messageFilterDebug != null) { this._messageFilterDebug.StopListeners(); this._messageFilterDebug.SetStatus(false); } if (this._messageFilterResponse != null) { this._messageFilterResponse.StopListeners(); this._messageFilterResponse.SetStatus(false); } if (this._messageFilterCustom != null) { this._messageFilterCustom.StopListeners(); this._messageFilterCustom.SetStatus(false); } if (this._interferenceReport != null) { this._interferenceReport.StopListeners(); } if (this.comm != null) { if (this.comm.RxType == CommunicationManager.ReceiverType.TTB) { this.comm.WriteData("A0A2 0009 CCA6 0102 0100 0000 0081 76B0 B3"); this.comm.WriteData("A0A2 0009 CCA6 0104 0100 0000 0081 78B0 B3"); } if (this.comm.ListenersCtrl != null) { this.comm.ListenersCtrl.Cleanup(); } if (this.comm.TTBPort.IsOpen) { this.comm.TTBPort.Close(); if (this._ttbWin != null) { this._ttbWin.Close(); this._ttbWin = null; } } if (this.comm.ListenersCtrl != null) { this.comm.ListenersCtrl = null; } if (this.comm.RxCtrl != null) { if (this.comm.RxCtrl.ResetCtrl != null) { this.comm.RxCtrl.ResetCtrl = null; } this.comm.RxCtrl.Dispose(); this.comm.RxCtrl = null; } this.comm.ClosePort(); } if (clsGlobal.CommWinRef.Contains(this.comm.PortName)) { clsGlobal.CommWinRef.Remove(this.comm.PortName); } }
private void commWindowCleanup() { this._isIdle = true; if (this._signalStrengthPanel != null) { this._signalStrengthPanel.Close(); } if (this._locationViewPanel != null) { this._locationViewPanel.Close(); } if (this._inputCommands != null) { this._inputCommands.Close(); } if (this._messageFilterDebug != null) { this._messageFilterDebug.Close(); } if (this._messageFilterResponse != null) { this._messageFilterResponse.Close(); } if (this._messageFilterCustom != null) { this._messageFilterCustom.Close(); } if (this._signalMapPanel != null) { this._signalMapPanel.Close(); } if (this._encryCtrl != null) { this._encryCtrl.Close(); } if (this._SatelliteStats != null) { this._SatelliteStats.Close(); } if (this._ttffDisplay != null) { this._ttffDisplay.Close(); } if (this._interferenceReport != null) { this._interferenceReport.Close(); } if (this._SiRFAware != null) { this._SiRFAware.Close(); } if (this._messageFilterDebug != null) { this._messageFilterDebug.StopListeners(); this._messageFilterDebug.Close(); } if (this._messageFilterResponse != null) { this._messageFilterResponse.StopListeners(); this._messageFilterResponse.Close(); } if (this._messageFilterCustom != null) { this._messageFilterCustom.StopListeners(); this._messageFilterCustom.Close(); } if (this._interferenceReport != null) { this._interferenceReport.StopListeners(); this._interferenceReport.Close(); } if (this._responseView != null) { this._responseView.Close(); } if (this._errorView != null) { this._errorView.Close(); } if (this._compassView != null) { this._compassView.Close(); } if (this.comm != null) { if (this.comm.RxType == CommunicationManager.ReceiverType.TTB) { this.comm.WriteData("A0A2 0009 CCA6 0102 0100 0000 0081 76B0 B3"); this.comm.WriteData("A0A2 0009 CCA6 0104 0100 0000 0081 78B0 B3"); } if (this.comm.ListenersCtrl != null) { this.comm.ListenersCtrl.Cleanup(); } if (this.comm.RxCtrl != null) { if (this.comm.RxCtrl.ResetCtrl != null) { this.comm.RxCtrl.ResetCtrl = null; } this.comm.RxCtrl.Dispose(); this.comm.RxCtrl = null; } if (this.comm.TTBPort.IsOpen) { this.comm.TTBPort.Close(); if (this._ttbWin != null) { this._ttbWin.Close(); this._ttbWin = null; } } } if (clsGlobal.CommWinRef.Contains(this.comm.PortName)) { clsGlobal.CommWinRef.Remove(this.comm.PortName); } }
private void rxTTBViewMenu_Click(object sender, EventArgs e) { if (!this.comm.TTBPort.IsOpen) { MessageBox.Show("TTB Port not connected", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { if ((this._ttbWin == null) || this._ttbWin.IsDisposed) { this._ttbWin = new frmCommOpen(); } this._ttbWin.updateTTBPort = (updateParentEventHandler) Delegate.Combine(this._ttbWin.updateTTBPort, new updateParentEventHandler(this.connectTTBPort)); this._ttbWin.MdiParent = base.MdiParent; this._ttbWin.comm.comPort = this.comm.TTBPort; this._ttbWin.comm.comPort.Close(); Thread.Sleep(0x3e8); this._ttbWin.Show(); this._ttbWin.comm.RequireHostRun = false; this._ttbWin.comm.MessageProtocol = "SSB"; this._ttbWin.comm.RxType = CommunicationManager.ReceiverType.TTB; this._ttbWin.comm.InputDeviceMode = CommonClass.InputDeviceModes.RS232; this._ttbWin.comm.BaudRate = this.comm.TTBPort.BaudRate.ToString(); this._ttbWin.comm.DataBits = this.comm.TTBPort.DataBits.ToString(); this._ttbWin.comm.StopBits = "One"; this._ttbWin.comm.Parity = "None"; this._ttbWin.comm.PortName = this.comm.TTBPort.PortName; this._ttbWin.comm.ProductFamily = CommonClass.ProductType.GSW; this._ttbWin.comm.OpenPort(); this._ttbWin.comm.WriteData("A0A2 0009 CCA6 0002 0100 0000 00 8175 B0B3"); this._ttbWin.comm.WriteData("A0A2 0009 CCA6 0004 0100 0000 00 8177 B0B3"); this._ttbWin.comm.WriteData("A0A2 0009 CCA6 0029 0100 0000 00 819C B0B3"); this._ttbWin.RunAsyncProcess(); this._ttbWin.Text = string.Format("TTB: {0}", this._ttbWin.comm.comPort.PortName); this._ttbWin.pollAlmanacMenu.Visible = false; this._ttbWin.pollSWVersionMenu.Visible = false; this._ttbWin.pollEphemerisMenu.Visible = false; this._ttbWin.pollNavParametersMenu.Visible = false; this._ttbWin.toolStrip1.Visible = false; this._ttbWin.TTBMenuItem.Visible = false; this._ttbWin.rxSessionMenuItem.Visible = false; this._ttbWin.cwInterfenceDetectionMenu.Visible = false; this._ttbWin.SiRFAwareMenuItem.Visible = false; this._ttbWin.setDevelopersDebugMenu.Visible = false; this._ttbWin.switchOperationModeMenu.Visible = false; this._ttbWin.lowPowerMenu.Visible = false; this._ttbWin.trackerICPeekPokeMenu.Visible = false; this._ttbWin.trackerConfigurationMenu.Visible = false; this._ttbWin.inputCommandMenuItem.Visible = false; this._ttbWin.locationMapMenu.Visible = false; this._ttbWin.lowPowerCommandBufferMenu.Visible = false; this._ttbWin.TTFFMenuItem.Visible = false; this._ttbWin.setABPMenuItem.Visible = false; this._ttbWin.switchProtocolMenu.Visible = false; this._ttbWin.setMEMSMenuItem.Visible = false; this._ttbWin.TrackerConfigVer2.Visible = false; this._ttbSigWin = this._ttbWin.CreateSignalViewWin(); this._ttbSigWin.Text = string.Format("TTB: {0} Signal View", this._ttbWin.comm.comPort.PortName); this.TTBMenuItem.Enabled = false; } }
private object GetContentFromPersistString(string persistString) { if (persistString == typeof(frmAutomationTests).ToString()) { _objFrmAutoTest = CreateAutomationTestWindow(); return _objFrmAutoTest; } if (persistString == typeof(frmPerformanceMonitor).ToString()) { _objFrmPerfMonitor = CreatefrmPerformanceMonitorWindow(); return _objFrmPerfMonitor; } if (persistString == typeof(frmPython).ToString()) { _objFrmPython = CreatePythonWindow(); return _objFrmPython; } if (persistString == typeof(frmCommInputMessage).ToString()) { if ((_objFrmCommOpen != null) && !_objFrmCommOpen.IsDisposed) { _objFrmCommInputMessage = new frmCommInputMessage(); _objFrmCommInputMessage.CommWindow = _objFrmCommOpen.comm; _objFrmCommOpen._inputCommands = _objFrmCommInputMessage; } return _objFrmCommInputMessage; } if (persistString == typeof(frmCommLocationMap).ToString()) { if ((_objFrmCommOpen != null) && !_objFrmCommOpen.IsDisposed) { _objFrmCommLocationMap = new frmCommLocationMap(); _objFrmCommLocationMap.CommWindow = _objFrmCommOpen.comm; _objFrmCommOpen._locationViewPanel = _objFrmCommLocationMap; } return _objFrmCommLocationMap; } if (persistString == typeof(frmCommSignalView).ToString()) { if ((_objFrmCommOpen != null) && !_objFrmCommOpen.IsDisposed) { _objFrmCommSignalView = new frmCommSignalView(); _objFrmCommSignalView.CommWindow = _objFrmCommOpen.comm; _objFrmCommOpen._signalStrengthPanel = _objFrmCommSignalView; } return _objFrmCommSignalView; } if (persistString == typeof(frmEncryCtrl).ToString()) { if ((_objFrmCommOpen != null) && !_objFrmCommOpen.IsDisposed) { _objFrmEncryCtrl = new frmEncryCtrl(_objFrmCommOpen.comm); _objFrmEncryCtrl.CommWindow = _objFrmCommOpen.comm; } return _objFrmEncryCtrl; } if (persistString == typeof(frmRFCaptureCtrl).ToString()) { _objFrmCaptureCtrl = CreateRFReplayCaptureWindow(); return _objFrmCaptureCtrl; } if (persistString == typeof(frmRFPlaybackConfig).ToString()) { _objFrmRFPlaybackConfig = CreateRFReplayConfigWindow(); return _objFrmRFPlaybackConfig; } if (persistString == typeof(frmRFPlaybackCtrl).ToString()) { _objFrmRFPlaybackCtrl = CreateRFReplayPlaybackWindow(); return _objFrmRFPlaybackCtrl; } if (persistString == typeof(frmSimplexCtrl).ToString()) { _objFrmSimplexCtrl = frmSimplexCtrl.GetChildInstance(); return _objFrmSimplexCtrl; } if (persistString == typeof(frmSPAzCtrl).ToString()) { _objFrmSPAzCtrl = frmSPAzCtrl.GetChildInstance(); return _objFrmSPAzCtrl; } if (persistString == typeof(frmRackCtrl).ToString()) { _objFrmRackCtrl = frmRackCtrl.GetChildInstance(); return _objFrmRackCtrl; } if (persistString == typeof(frmE911Report).ToString()) { _objFrmE911Report = frmE911Report.GetChildInstance("E911"); return _objFrmE911Report; } if (persistString == typeof(frmNavPerformanceReport).ToString()) { _objFrmNavPerformanceReport = frmNavPerformanceReport.GetChildInstance(); return _objFrmNavPerformanceReport; } /* * //! if (persistString == typeof(frmGPIBCtrl).ToString()) { _objFrmGPIBCtrl = frmGPIBCtrl.GetChildInstance(); return _objFrmNavPerformanceReport; } */ if (persistString.Contains("frmCommOpen")) { _objFrmCommOpen = new frmCommOpen(); return _objFrmCommOpen; } return null; }
public frmCommOpen CreateCommWindow() { frmCommOpen objfrmMComm = null; base.Invoke((MethodInvoker)delegate { objfrmMComm = new frmCommOpen(); objfrmMComm.MdiParent = this; objfrmMComm.Show(); }); return objfrmMComm; }
public void SetCommWinRef(string m_key, frmCommOpen m_val) { if (clsGlobal.CommWinRef.ContainsKey(m_key)) { clsGlobal.CommWinRef.Remove(m_key); } clsGlobal.CommWinRef.Add(m_key, m_val); }
private void setAddReceiverMenuState() { if (clsGlobal.IsMarketingUser()) { bool flag = false; foreach (Form form in base.MdiChildren) { if (form.Name == "frmCommOpen") { flag = true; _objFrmCommOpen = (frmCommOpen) form; break; } } if (!flag) { } } }
public void portManagerCleanup() { EventHandler method = null; EventHandler handler2 = null; EventHandler handler3 = null; EventHandler handler4 = null; EventHandler handler5 = null; EventHandler handler6 = null; EventHandler handler7 = null; EventHandler handler8 = null; EventHandler handler9 = null; EventHandler handler10 = null; EventHandler handler11 = null; EventHandler handler12 = null; EventHandler handler13 = null; EventHandler handler14 = null; EventHandler handler15 = null; EventHandler handler16 = null; EventHandler handler17 = null; EventHandler handler18 = null; EventHandler handler19 = null; EventHandler handler20 = null; EventHandler handler21 = null; EventHandler handler22 = null; EventHandler handler23 = null; EventHandler handler24 = null; EventHandler handler25 = null; if (this._signalStrengthPanel != null) { if (this._signalStrengthPanel.InvokeRequired) { if (method == null) { method = delegate { this._signalStrengthPanel.Close(); }; } this._signalStrengthPanel.BeginInvoke(method); } else { this._signalStrengthPanel.Close(); } } if (this._locationViewPanel != null) { if (this._locationViewPanel.InvokeRequired) { if (handler2 == null) { handler2 = delegate { this._locationViewPanel.Close(); }; } this._locationViewPanel.BeginInvoke(handler2); } else { this._locationViewPanel.Close(); } } if (this._DRNavStatusViewPanel != null) { if (this._DRNavStatusViewPanel.InvokeRequired) { if (handler3 == null) { handler3 = delegate { this._DRNavStatusViewPanel.Close(); }; } this._DRNavStatusViewPanel.BeginInvoke(handler3); } else { this._DRNavStatusViewPanel.Close(); } } if (this._DRSensorViewPanel != null) { if (this._DRSensorViewPanel.InvokeRequired) { if (handler4 == null) { handler4 = delegate { this._DRSensorViewPanel.Close(); }; } this._DRSensorViewPanel.BeginInvoke(handler4); } else { this._DRSensorViewPanel.Close(); } } if (this._inputCommands != null) { if (this._inputCommands.InvokeRequired) { if (handler5 == null) { handler5 = delegate { this._inputCommands.Close(); }; } this._inputCommands.BeginInvoke(handler5); } else { this._inputCommands.Close(); } } if (this._transmitSerialMessageWin != null) { if (this._transmitSerialMessageWin.InvokeRequired) { if (handler6 == null) { handler6 = delegate { this._transmitSerialMessageWin.Close(); }; } this._transmitSerialMessageWin.BeginInvoke(handler6); } else { this._transmitSerialMessageWin.Close(); } } if (this._svsMapPanel != null) { if (this._svsMapPanel.InvokeRequired) { if (handler7 == null) { handler7 = delegate { this._svsMapPanel.Close(); }; } this._svsMapPanel.BeginInvoke(handler7); } else { this._svsMapPanel.Close(); } } if (this._svsTrajPanel != null) { if (this._svsTrajPanel.InvokeRequired) { if (handler8 == null) { handler8 = delegate { this._svsTrajPanel.Close(); }; } this._svsTrajPanel.BeginInvoke(handler8); } else { this._svsTrajPanel.Close(); } } if (this._svsCNoPanel != null) { if (this._svsCNoPanel.InvokeRequired) { if (handler9 == null) { handler9 = delegate { this._svsCNoPanel.Close(); }; } this._svsCNoPanel.BeginInvoke(handler9); } else { this._svsCNoPanel.Close(); } } if (this._SatelliteStats != null) { if (this._SatelliteStats.InvokeRequired) { if (handler10 == null) { handler10 = delegate { this._SatelliteStats.Close(); }; } this._SatelliteStats.BeginInvoke(handler10); } else { this._SatelliteStats.Close(); } } if (this._ttffDisplay != null) { if (this._ttffDisplay.InvokeRequired) { if (handler11 == null) { handler11 = delegate { this._ttffDisplay.Close(); }; } this._ttffDisplay.BeginInvoke(handler11); } else { this._ttffDisplay.Close(); } } if (this._interferenceReport != null) { if (this._interferenceReport.InvokeRequired) { if (handler12 == null) { handler12 = delegate { this._interferenceReport.Close(); }; } this._interferenceReport.BeginInvoke(handler12); } else { this._interferenceReport.Close(); } } if (this._SiRFAware != null) { if (this._SiRFAware.InvokeRequired) { if (handler13 == null) { handler13 = delegate { this._SiRFAware.Close(); }; } this._SiRFAware.BeginInvoke(handler13); } else { this._SiRFAware.Close(); } } if (this.MessageView != null) { if (this.MessageView.InvokeRequired) { if (handler14 == null) { handler14 = delegate { this.MessageView.StopListeners(); this.MessageView.Close(); }; } this.MessageView.BeginInvoke(handler14); } else { this.MessageView.StopListeners(); this.MessageView.Close(); } } if (this._ttffDisplay != null) { if (this._ttffDisplay.InvokeRequired) { if (handler15 == null) { handler15 = delegate { this._ttffDisplay.Close(); }; } this._ttffDisplay.BeginInvoke(handler15); } else { this._ttffDisplay.Close(); } } if (this._interferenceReport != null) { if (this._interferenceReport.InvokeRequired) { if (handler16 == null) { handler16 = delegate { this._interferenceReport.StopListeners(); this._interferenceReport.Close(); }; } this._interferenceReport.BeginInvoke(handler16); } else { this._interferenceReport.StopListeners(); this._interferenceReport.Close(); } } if (this._responseView != null) { if (this._responseView.InvokeRequired) { if (handler17 == null) { handler17 = delegate { this._responseView.Close(); }; } this._responseView.BeginInvoke(handler17); } else { this._responseView.Close(); } } if (this._errorView != null) { if (this._errorView.InvokeRequired) { if (handler18 == null) { handler18 = delegate { this._errorView.Close(); }; } this._errorView.BeginInvoke(handler18); } else { this._errorView.Close(); } } if (this.DebugView != null) { if (this.DebugView.InvokeRequired) { if (handler19 == null) { handler19 = delegate { this.DebugView.Close(); }; } this.DebugView.BeginInvoke(handler19); } else { this.DebugView.Close(); } } if (this._compassView != null) { if (this._compassView.InvokeRequired) { if (handler20 == null) { handler20 = delegate { this._compassView.Close(); }; } this._compassView.BeginInvoke(handler20); } else { this._compassView.Close(); } } if (this._memsView != null) { if (this._memsView.InvokeRequired) { if (handler21 == null) { handler21 = delegate { this._memsView.Close(); }; } this._memsView.BeginInvoke(handler21); } else { this._memsView.Close(); } } if (this.NavVsTimeView != null) { if (this.NavVsTimeView.InvokeRequired) { if (handler22 == null) { handler22 = delegate { this.NavVsTimeView.Close(); }; } this.NavVsTimeView.BeginInvoke(handler22); } else { this.NavVsTimeView.Close(); } } if (this._svsTrackedVsTimePanel != null) { if (this._svsTrackedVsTimePanel.InvokeRequired) { if (handler23 == null) { handler23 = delegate { this._svsTrackedVsTimePanel.Close(); }; } this._svsTrackedVsTimePanel.BeginInvoke(handler23); } else { this._svsTrackedVsTimePanel.Close(); } } if (this.TTFSView != null) { if (this.TTFSView.InvokeRequired) { if (handler24 == null) { handler24 = delegate { this.TTFSView.Close(); }; } this.TTFSView.BeginInvoke(handler24); } else { this.TTFSView.Close(); } } if (this.comm != null) { if (this.comm.RxType == CommunicationManager.ReceiverType.TTB) { this.comm.WriteData("A0A2 0009 CCA6 0102 0100 0000 0081 76B0 B3"); this.comm.WriteData("A0A2 0009 CCA6 0104 0100 0000 0081 78B0 B3"); } if (this.comm.ListenersCtrl != null) { this.comm.ListenersCtrl.Stop(); this.comm.ListenersCtrl.Cleanup(); } if (this.comm.RxCtrl != null) { if (this.comm.RxCtrl.ResetCtrl != null) { this.comm.RxCtrl.ResetCtrl.ResetTimerStop(true); this.comm.RxCtrl.ResetCtrl.CloseTTFFLog(); this.comm.RxCtrl.ResetCtrl = null; } this.comm.RxCtrl.LogCleanup(); this.comm.RxCtrl.Dispose(); this.comm.RxCtrl = null; } if (this.comm.TTBPort.IsOpen) { this.comm.TTBPort.Close(); if (this._ttbWin != null) { if (this._ttbWin.InvokeRequired) { if (handler25 == null) { handler25 = delegate { this._ttbWin.Close(); this._ttbWin = null; }; } this._ttbWin.BeginInvoke(handler25); } else { this._ttbWin.Close(); this._ttbWin = null; } } } this.comm.ClosePort(); } if (this.TTFSDataList != null) { this.TTFSDataList.Clear(); } if (clsGlobal.CommWinRef.Contains(this.comm.PortName)) { clsGlobal.CommWinRef.Remove(this.comm.PortName); } }