Exemplo n.º 1
0
 private void signalStrengthToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!base.IsDisposed)
     {
         string str = "File Playback Signal View";
         if ((this._signalStrengthPanel == null) || this._signalStrengthPanel.IsDisposed)
         {
             this._signalStrengthPanel = new frmCommSignalView();
         }
         this._signalStrengthPanel.CommWindow = this.comm;
         this._signalStrengthPanel.Text = str;
         this._signalStrengthPanel.Show();
         this._signalStrengthPanel.BringToFront();
     }
     else
     {
         MessageBox.Show("File Playback not initialized", "Information");
     }
 }
Exemplo n.º 2
0
 public frmCommSignalView CreateSignalViewWin()
 {
     EventHandler method = null;
     if (!base.IsDisposed)
     {
         if (method == null)
         {
             method = delegate {
                 if (this.toolBarSignalViewBtn.CheckState == CheckState.Indeterminate)
                 {
                     this.toolBarSignalViewBtn.CheckState = CheckState.Unchecked;
                     if ((this._signalStrengthPanel != null) && !this._signalStrengthPanel.IsDisposed)
                     {
                         this._signalStrengthPanel.Close();
                     }
                 }
                 else
                 {
                     string str = this.comm.sourceDeviceName + ": Signal View";
                     if ((this._signalStrengthPanel == null) || this._signalStrengthPanel.IsDisposed)
                     {
                         this._signalStrengthPanel = new frmCommSignalView();
                         this._signalStrengthPanel.Show();
                     }
                     this._signalStrengthPanel.CommWindow = this.comm;
                     this._signalStrengthPanel.Text = str;
                     this._signalStrengthPanel.updateMainWindow += new frmCommSignalView.updateParentEventHandler(this.updateSubWindowState);
                     this._signalStrengthPanel.BringToFront();
                     this.toolBarSignalViewBtn.CheckState = CheckState.Indeterminate;
                 }
             };
         }
         base.Invoke(method);
     }
     else
     {
         MessageBox.Show("COM window not initialized!", "Information");
     }
     return this._signalStrengthPanel;
 }
Exemplo n.º 3
0
        internal void updateSubWindowState(string subWinName)
        {
            EventHandler method = null;
            EventHandler handler2 = null;
            EventHandler handler3 = null;
            EventHandler handler4 = null;
            EventHandler handler5 = null;
            EventHandler handler6 = null;
            switch (subWinName)
            {
                case "frmCommInputMessage":
                    this._inputCommands = null;
                    return;

                case "frmCommRadarMap":
                    this._signalMapPanel = null;
                    if (method == null)
                    {
                        method = delegate {
                            this.toolBarRadarBtn.CheckState = CheckState.Unchecked;
                        };
                    }
                    base.Invoke(method);
                    return;

                case "frmEncryCtrl":
                    this._encryCtrl = null;
                    return;

                case "frmSatelliteStats":
                    this._SatelliteStats = null;
                    return;

                case "frmCommLocationMap":
                    this._locationViewPanel = null;
                    if (handler2 == null)
                    {
                        handler2 = delegate {
                            this.toolBarLocationBtn.CheckState = CheckState.Unchecked;
                        };
                    }
                    base.Invoke(handler2);
                    return;

                case "frmCommSignalView":
                    this._signalStrengthPanel = null;
                    if (handler3 == null)
                    {
                        handler3 = delegate {
                            this.toolBarSignalViewBtn.CheckState = CheckState.Unchecked;
                        };
                    }
                    base.Invoke(handler3);
                    return;

                case "frmCommMessageFilter":
                    this._messageFilterCustom = null;
                    return;

                case "frmTTFFDisplay":
                    this._ttffDisplay = null;
                    if (handler4 == null)
                    {
                        handler4 = delegate {
                            this.toolBarTTFFBtn.CheckState = CheckState.Unchecked;
                        };
                    }
                    base.Invoke(handler4);
                    return;

                case "frmInterferenceReport":
                    this._interferenceReport = null;
                    return;

                case "frmSiRFAware":
                    this._SiRFAware = null;
                    return;

                case "frmCommResponseView":
                    this._responseView = null;
                    if (handler5 == null)
                    {
                        handler5 = delegate {
                            this.toolBarResponseViewBtn.CheckState = CheckState.Unchecked;
                        };
                    }
                    base.Invoke(handler5);
                    return;

                case "frmCommErrorView":
                    this._errorView = null;
                    if (handler6 == null)
                    {
                        handler6 = delegate {
                            this.toolBarErrorViewBtn.CheckState = CheckState.Unchecked;
                        };
                    }
                    base.Invoke(handler6);
                    return;
            }
        }
Exemplo n.º 4
0
 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;
     }
 }
Exemplo n.º 5
0
 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;
 }