コード例 #1
0
ファイル: frmCommOpen.cs プロジェクト: facchinm/SiRFLive
 public frmCommErrorView CreateErrorViewWin()
 {
     EventHandler method = null;
     if (!base.IsDisposed)
     {
         if (method == null)
         {
             method = delegate {
                 if (this.toolBarErrorViewBtn.CheckState == CheckState.Indeterminate)
                 {
                     this.toolBarErrorViewBtn.CheckState = CheckState.Unchecked;
                     if ((this._errorView != null) && !this._errorView.IsDisposed)
                     {
                         this._errorView.Close();
                     }
                 }
                 else
                 {
                     string str = this.comm.sourceDeviceName + ": Error View";
                     if ((this._errorView == null) || this._errorView.IsDisposed)
                     {
                         this._errorView = new frmCommErrorView();
                         this._errorView.Show();
                     }
                     this._errorView.CommWindow = this.comm;
                     this._errorView.Text = str;
                     this._errorView.updateMainWindow += new frmCommErrorView.updateParentEventHandler(this.updateSubWindowState);
                     this._errorView.BringToFront();
                     this.toolBarErrorViewBtn.CheckState = CheckState.Indeterminate;
                 }
             };
         }
         base.Invoke(method);
     }
     else
     {
         MessageBox.Show("COM window not initialized!", "Information");
     }
     return this._errorView;
 }
コード例 #2
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;
            }
        }