/// <summary> /// 用于注销当前子窗体信息 /// </summary> public void Log_Off() { //设置图标 btn_connect_com.Content = "Connect"; // 串口关闭的时候清空显示 btn_connect_com.Content = "Connect"; for (int i = 0; i < mDataInfoLabelList.Count; i++) { mDataInfoLabelList[i].Content = null; } GpsState.SetUnactive(); }
/// <summary> /// 更新线程 /// </summary> public void UpdateUI_Thread() { // 更新UI this.Dispatcher.Invoke(new Action(() => { // 扫描更新界面 for (int i = 0; i < mDataInfoLabelList.Count; i++) { // 是否可以更新 if (mModel.MCustomDataModel.DataBaseList[i] != null) { if (mModel.MCustomDataModel.DataBaseList[i].IsUpdate == true) { // 设置信息 mDataInfoLabelList[i].Content = mModel.MCustomDataModel.DataBaseList[i].Info; mModel.MCustomDataModel.DataBaseList[i].IsUpdate = false; } else { // 如果在范围内 if (i >= CustomDataModel.LABEL_PSEUDORANGE && i <= CustomDataModel.LABEL_GDOP) { mDataInfoLabelList[i].Content = "----"; } } } } // 如果定位标志可更新 if (mModel.MCustomDataModel.DataBaseList[CustomDataModel.POS_STATE].IsUpdate) { // 获取id号 int id = Convert.ToInt32(mModel.MCustomDataModel.DataBaseList[CustomDataModel.POS_STATE].Info); // 如果id正确 if (id == User_Model.GGA_POS_SUCCESSFUL_IDENTIFIER1 || id == User_Model.GGA_POS_SUCCESSFUL_IDENTIFIER2) { // 激活状态 GpsState.SetActive(); } else { GpsState.SetUnactive(); } mModel.MCustomDataModel.DataBaseList[CustomDataModel.POS_STATE].IsUpdate = false; } })); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.lab_com = ((System.Windows.Controls.Label)(target)); return; case 2: this.commbox_com = ((System.Windows.Controls.ComboBox)(target)); #line 18 "..\..\..\View\BaseInfoPage.xaml" this.commbox_com.MouseEnter += new System.Windows.Input.MouseEventHandler(this.commbox_com_MouseEnter); #line default #line hidden return; case 3: this.lab_baudRate = ((System.Windows.Controls.Label)(target)); return; case 4: this.combox_baudRate = ((System.Windows.Controls.ComboBox)(target)); return; case 5: this.btn_connect_com = ((System.Windows.Controls.Button)(target)); return; case 6: #line 44 "..\..\..\View\BaseInfoPage.xaml" ((System.Windows.Shapes.Rectangle)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.btn_connect_com_Click); #line default #line hidden return; case 7: this.label = ((System.Windows.Controls.Label)(target)); return; case 8: this.label_longitude = ((System.Windows.Controls.Label)(target)); return; case 9: this.lable_latitude = ((System.Windows.Controls.Label)(target)); return; case 10: this.lable_UTCtime = ((System.Windows.Controls.Label)(target)); return; case 11: this.lable_altitude = ((System.Windows.Controls.Label)(target)); return; case 12: this.lable_Ellipsoidal_height = ((System.Windows.Controls.Label)(target)); return; case 13: this.lable_satellite = ((System.Windows.Controls.Label)(target)); return; case 14: this.lable_pos_acc = ((System.Windows.Controls.Label)(target)); return; case 15: this.lable_pseudorange = ((System.Windows.Controls.Label)(target)); return; case 16: this.lable_pseudorangeRate = ((System.Windows.Controls.Label)(target)); return; case 17: this.lable_GDOP = ((System.Windows.Controls.Label)(target)); return; case 18: this.lable_PDOP = ((System.Windows.Controls.Label)(target)); return; case 19: this.lable_GAS_coordination_X = ((System.Windows.Controls.Label)(target)); return; case 20: this.lable_GAS_coordination_Y = ((System.Windows.Controls.Label)(target)); return; case 21: this.GpsState = ((BD_Terminal.View.GpsState)(target)); return; case 22: this.LongStd_Grid = ((System.Windows.Controls.Grid)(target)); return; case 23: this.label_longstd = ((System.Windows.Controls.Label)(target)); return; case 24: this.LatStd_Grid = ((System.Windows.Controls.Grid)(target)); return; case 25: this.label_latstd = ((System.Windows.Controls.Label)(target)); return; case 26: #line 120 "..\..\..\View\BaseInfoPage.xaml" ((System.Windows.Shapes.Rectangle)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.WrapPanel_MouseEnterLongWarp); #line default #line hidden #line 120 "..\..\..\View\BaseInfoPage.xaml" ((System.Windows.Shapes.Rectangle)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.WrapPanel_MouseLeaveLongWarp); #line default #line hidden return; case 27: #line 121 "..\..\..\View\BaseInfoPage.xaml" ((System.Windows.Shapes.Rectangle)(target)).MouseEnter += new System.Windows.Input.MouseEventHandler(this.WrapPanel_MouseEnterLatWarp); #line default #line hidden #line 121 "..\..\..\View\BaseInfoPage.xaml" ((System.Windows.Shapes.Rectangle)(target)).MouseLeave += new System.Windows.Input.MouseEventHandler(this.WrapPanel_MouseLeaveLatWarp); #line default #line hidden return; } this._contentLoaded = true; }