コード例 #1
0
ファイル: frmCommOpen.cs プロジェクト: facchinm/SiRFLive
        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;
            }
        }
コード例 #2
0
ファイル: frmCommOpen.cs プロジェクト: facchinm/SiRFLive
 internal frmCommSiRFaware CreateSiRFAwareWin()
 {
     EventHandler method = null;
     if (!base.IsDisposed)
     {
         if (this.comm != null)
         {
             if (method == null)
             {
                 method = delegate {
                     string str = this.comm.sourceDeviceName + ": SiRFaware";
                     if ((this._SiRFAware == null) || this._SiRFAware.IsDisposed)
                     {
                         this._SiRFAware = new frmCommSiRFaware(this.comm);
                         this._SiRFAware.Show();
                         this._SiRFAware.StartListen();
                     }
                     this._SiRFAware.Text = str;
                     this._SiRFAware.updateMainWindow += new frmCommSiRFaware.updateParentEventHandler(this.updateSubWindowState);
                     this._SiRFAware.BringToFront();
                 };
             }
             base.Invoke(method);
         }
         else
         {
             MessageBox.Show("COM window not initialized!", "Information");
         }
     }
     return this._SiRFAware;
 }