public bool SetupRxCtrl()
 {
     bool flag = false;
     try
     {
         this.m_Protocols.m_messageProtocol = this._messageProtocol;
         string str = this._messageProtocol;
         if (str != null)
         {
             if (!(str == "SSB"))
             {
                 if (str == "OSP")
                 {
                     goto Label_0205;
                 }
                 if (str == "NMEA")
                 {
                     goto Label_0398;
                 }
             }
             else
             {
                 this._txTransType = TransmissionType.GP2;
                 this.LogFormat = TransmissionType.GPS;
                 this.RxCtrl = new SS3AndGSD3TWReceiver();
                 this.RxCtrl.RxCommWindow = this;
                 this.RxCtrl.DutStationSetup = this.m_TestSetup;
                 this.RxCtrl.RxNavData = this.m_NavData;
                 this.RxCtrl.MessageProtocol = this._messageProtocol;
                 if (this._rxType == ReceiverType.GSW)
                 {
                     this._aidingProtocol = "SSB";
                 }
                 else
                 {
                     this._aidingProtocol = "AI3";
                 }
                 this.RxCtrl.AidingProtocol = this._aidingProtocol;
                 this.RxCtrl.ControlChannelProtocolFile = ConfigurationManager.AppSettings["InstalledDirectory"] + @"\Protocols\Protocols_F.xml";
                 this.RxCtrl.ControlChannelVersion = "2.1";
                 this.RxCtrl.AidingProtocolVersion = "2.2";
                 this.RxCtrl.ResetCtrl = new FAndSSBReset();
                 this.RxCtrl.ResetCtrl.ResetComm = this;
                 this.RxCtrl.ResetCtrl.DutStationSetup = this.RxCtrl.DutStationSetup;
                 this.RxCtrl.ResetCtrl.ResetNavData = this.RxCtrl.RxNavData;
                 this.RxCtrl.ResetCtrl.ResetGPSTimer = this.RxCtrl.GPSTimerEngine;
                 this.AutoReplyCtrl = new AutoReplyMgr_F(this.RxCtrl.ControlChannelProtocolFile);
                 this.AutoReplyCtrl.ControlChannelVersion = this.RxCtrl.ControlChannelVersion;
                 this.AutoReplyCtrl.AidingProtocolVersion = this.RxCtrl.AidingProtocolVersion;
                 this.ListenersCtrl = new ListenerManager();
                 this.ListenersCtrl.AidingProtocol = this._aidingProtocol;
                 this.ListenersCtrl.RxType = this._rxType;
             }
         }
         goto Label_0493;
     Label_0205:
         this._txTransType = TransmissionType.GP2;
         this.LogFormat = TransmissionType.GPS;
         this.RxCtrl = new OSPReceiver();
         this.RxCtrl.RxCommWindow = this;
         this.RxCtrl.DutStationSetup = this.m_TestSetup;
         this.RxCtrl.RxNavData = this.m_NavData;
         this.RxCtrl.MessageProtocol = this._messageProtocol;
         this.RxCtrl.AidingProtocol = this._aidingProtocol;
         this.RxCtrl.ControlChannelProtocolFile = ConfigurationManager.AppSettings["InstalledDirectory"] + @"\Protocols\Protocols_F.xml";
         this.RxCtrl.ControlChannelVersion = "1.0";
         this.RxCtrl.AidingProtocolVersion = "1.0";
         this.RxCtrl.ResetCtrl = new OSPReset();
         this.RxCtrl.ResetCtrl.ResetComm = this;
         this.RxCtrl.ResetCtrl.DutStationSetup = this.RxCtrl.DutStationSetup;
         this.RxCtrl.ResetCtrl.ResetNavData = this.RxCtrl.RxNavData;
         this.RxCtrl.ResetCtrl.ResetGPSTimer = this.RxCtrl.GPSTimerEngine;
         this.AutoReplyCtrl = new AutoReplyMgr_OSP(this.RxCtrl.ControlChannelProtocolFile);
         this.AutoReplyCtrl.ControlChannelVersion = this.RxCtrl.ControlChannelVersion;
         this.AutoReplyCtrl.AidingProtocolVersion = this.RxCtrl.AidingProtocolVersion;
         this.ListenersCtrl = new OSPListnerManager();
         this.ListenersCtrl.AidingProtocol = this._aidingProtocol;
         this.ListenersCtrl.RxType = this._rxType;
         goto Label_0493;
     Label_0398:
         this._txTransType = TransmissionType.Text;
         this.RxTransType = TransmissionType.Text;
         this.LogFormat = TransmissionType.Text;
         this._rxType = ReceiverType.NMEA;
         this.RxCtrl = new NMEAReceiver();
         this.RxCtrl.RxCommWindow = this;
         this.RxCtrl.DutStationSetup = this.m_TestSetup;
         this.RxCtrl.RxNavData = this.m_NavData;
         this.RxCtrl.MessageProtocol = this._messageProtocol;
         this.RxCtrl.AidingProtocol = this._aidingProtocol;
         this.RxCtrl.ResetCtrl = new NMEAReset();
         this.RxCtrl.ResetCtrl.ResetComm = this;
         this.RxCtrl.ResetCtrl.DutStationSetup = this.RxCtrl.DutStationSetup;
         this.RxCtrl.ResetCtrl.ResetNavData = this.RxCtrl.RxNavData;
         this.ListenersCtrl = new NMEAListnerManager();
         this.ListenersCtrl.AidingProtocol = this._aidingProtocol;
         this.ListenersCtrl.RxType = this._rxType;
     Label_0493:
         flag = true;
     }
     catch (Exception exception)
     {
         this.ErrorPrint(exception.Message);
         flag = false;
     }
     return flag;
 }
 private void cleanupClass()
 {
     this.dataGui = null;
     if (this.dataPlot != null)
     {
         this.dataPlot.Dispose();
         this.dataPlot = null;
     }
     if (this._debugViewRTBDisplay != null)
     {
         this._debugViewRTBDisplay = null;
     }
     if (this._displayPanelCompass != null)
     {
         this._displayPanelCompass.Dispose();
         this._displayPanelCompass = null;
     }
     if (this._displayPanelDRSensors != null)
     {
         this._displayPanelDRSensors.Dispose();
         this._displayPanelDRSensors = null;
     }
     if (this._displayPanelDRStatusStates != null)
     {
         this._displayPanelDRStatusStates.Dispose();
         this._displayPanelDRStatusStates = null;
     }
     if (this._displayPanelLocation != null)
     {
         this._displayPanelLocation.Dispose();
         this._displayPanelLocation = null;
     }
     if (this._displayPanelMEMS != null)
     {
         this._displayPanelMEMS.Dispose();
         this._displayPanelMEMS = null;
     }
     if (this._displayPanelPitch != null)
     {
         this._displayPanelPitch.Dispose();
         this._displayPanelPitch = null;
     }
     if (this._displayPanelRoll != null)
     {
         this._displayPanelRoll.Dispose();
         this._displayPanelRoll = null;
     }
     if (this._displayPanelSatelliteStats != null)
     {
         this._displayPanelSatelliteStats.Dispose();
         this._displayPanelSatelliteStats = null;
     }
     if (this._displayPanelSignal != null)
     {
         this._displayPanelSignal.Dispose();
         this._displayPanelSignal = null;
     }
     if (this._displayPanelSVs != null)
     {
         this._displayPanelSVs.Dispose();
         this._displayPanelSVs = null;
     }
     if (this._displayPanelSVTraj != null)
     {
         this._displayPanelSVTraj.Dispose();
         this._displayPanelSVTraj = null;
     }
     if (this._errorViewRTBDisplay != null)
     {
         this._errorViewRTBDisplay = null;
     }
     if (this._responseViewRTBDisplay != null)
     {
         this._responseViewRTBDisplay = null;
     }
     if (this.RxCtrl != null)
     {
         this.RxCtrl.Dispose();
         this.RxCtrl = null;
     }
     this.ListenersCtrl = null;
     this.AutoReplyCtrl = null;
     if (this.TTBPort != null)
     {
         this.TTBPort.Dispose();
         this.TTBPort = null;
     }
     if (this.comPort != null)
     {
         this.comPort.Dispose();
         this.comPort = null;
     }
     this.NavigationParamrters = null;
     this.NavTruthDataHash = null;
     this.NavSolutionParams = null;
     this.TrackerICCtrl = null;
     this.SiRFNavStartStop = null;
     this.m_NavData = null;
     this._CSVBuff = null;
     this.m_Protocols.Dispose();
     this.m_Protocols = null;
     this.CMC = null;
     this.Log = null;
     this.ToSendMsgQueue.Clear();
     this.ToSendMsgQueue = null;
     this.ErrorStringList.Clear();
     this.ErrorStringList = null;
     this.UserSpecifiedMsgList.Clear();
     this.UserSpecifiedMsgList = null;
     this.UserSpecifiedSubStringList.Clear();
     this.UserSpecifiedSubStringList = null;
     this._inDataBytes.Clear();
     this._inDataBytes = null;
 }
 public void FilePlaybackCommSetup()
 {
     string str = this._messageProtocol;
     if (str != null)
     {
         if (!(str == "SSB"))
         {
             if (!(str == "OSP"))
             {
                 if (str == "NMEA")
                 {
                     this._txTransType = TransmissionType.Text;
                     this.RxTransType = TransmissionType.Text;
                     this.LogFormat = TransmissionType.Text;
                     this._rxType = ReceiverType.NMEA;
                     this.RxCtrl = new NMEAReceiver();
                     this.RxCtrl.RxCommWindow = this;
                     this.RxCtrl.DutStationSetup = this.m_TestSetup;
                     this.RxCtrl.RxNavData = this.m_NavData;
                     this.RxCtrl.MessageProtocol = this._messageProtocol;
                     this.RxCtrl.AidingProtocol = this._aidingProtocol;
                     this.RxCtrl.ResetCtrl = new NMEAReset();
                     this.RxCtrl.ResetCtrl.ResetComm = this;
                     this.RxCtrl.ResetCtrl.DutStationSetup = this.RxCtrl.DutStationSetup;
                     this.RxCtrl.ResetCtrl.ResetNavData = this.RxCtrl.RxNavData;
                     this.ListenersCtrl = new NMEAListnerManager();
                     this.ListenersCtrl.AidingProtocol = this._aidingProtocol;
                     this.ListenersCtrl.RxType = this._rxType;
                 }
                 return;
             }
         }
         else
         {
             this._txTransType = TransmissionType.GP2;
             this.LogFormat = TransmissionType.GPS;
             this.RxCtrl = new SS3AndGSD3TWReceiver();
             this.RxCtrl.RxCommWindow = this;
             this.RxCtrl.DutStationSetup = this.m_TestSetup;
             this.RxCtrl.RxNavData = this.m_NavData;
             this.RxCtrl.MessageProtocol = this._messageProtocol;
             if (this._rxType == ReceiverType.GSW)
             {
                 this._aidingProtocol = "SSB";
             }
             else
             {
                 this._aidingProtocol = "AI3";
             }
             this.RxCtrl.AidingProtocol = this._aidingProtocol;
             this.RxCtrl.ControlChannelProtocolFile = ConfigurationManager.AppSettings["InstalledDirectory"] + @"\Protocols\Protocols_F.xml";
             this.RxCtrl.ControlChannelVersion = "2.1";
             this.RxCtrl.ResetCtrl = new FAndSSBReset();
             this.RxCtrl.ResetCtrl.ResetComm = this;
             this.RxCtrl.ResetCtrl.DutStationSetup = this.RxCtrl.DutStationSetup;
             this.RxCtrl.ResetCtrl.ResetNavData = this.RxCtrl.RxNavData;
             this.AutoReplyCtrl = new AutoReplyMgr_F(this.RxCtrl.ControlChannelProtocolFile);
             this.AutoReplyCtrl.ControlChannelVersion = this.RxCtrl.ControlChannelVersion;
             this.ListenersCtrl = new ListenerManager();
             this.ListenersCtrl.AidingProtocol = this._aidingProtocol;
             this.ListenersCtrl.RxType = this._rxType;
             this.AutoReplyCtrl = new AutoReplyMgr_F();
             return;
         }
         this._txTransType = TransmissionType.GP2;
         this.LogFormat = TransmissionType.GPS;
         this.RxCtrl = new OSPReceiver();
         this.RxCtrl.RxCommWindow = this;
         this.RxCtrl.DutStationSetup = this.m_TestSetup;
         this.RxCtrl.RxNavData = this.m_NavData;
         this.RxCtrl.MessageProtocol = this._messageProtocol;
         this.RxCtrl.AidingProtocol = this._aidingProtocol;
         this.RxCtrl.ControlChannelProtocolFile = ConfigurationManager.AppSettings["InstalledDirectory"] + @"\Protocols\Protocols_F.xml";
         this.RxCtrl.ControlChannelVersion = "1.0";
         this.RxCtrl.ResetCtrl = new OSPReset();
         this.RxCtrl.ResetCtrl.ResetComm = this;
         this.RxCtrl.ResetCtrl.DutStationSetup = this.RxCtrl.DutStationSetup;
         this.RxCtrl.ResetCtrl.ResetNavData = this.RxCtrl.RxNavData;
         this.AutoReplyCtrl = new AutoReplyMgr_OSP(this.RxCtrl.ControlChannelProtocolFile);
         this.AutoReplyCtrl.ControlChannelVersion = this.RxCtrl.ControlChannelVersion;
         this.ListenersCtrl = new OSPListnerManager();
         this.ListenersCtrl.AidingProtocol = this._aidingProtocol;
         this.ListenersCtrl.RxType = this._rxType;
     }
 }