private void OnCarSignalReceived(CarSignalReceivedMessage message) { try { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } tempMessage = message; carSignal = message.CarSignal; RunOnUiThread(UpdateCarSensorState); if (CurentItemName.Contains("上车")) { RunOnUiThread(() => { string carhead = message.CarSignal.Sensor.ArrivedHeadstock ? "是" : "否"; string cartail = message.CarSignal.Sensor.ArrivedTailstock ? "是" : "否"; tvExamItem.Text = $"当前项目:{CurentItemName},车头:{carhead},车尾:{cartail}"; }); } } catch (Exception ex) { //Logger.Error("SanLianCarSignalReceived", ex.Message); } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { try { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } tempMessage = message; carSignal = message.CarSignal; if (carSignal.Distance >= ExamDistance && IsAutoTriggerPullOver && IsTriggerPullOver == false) { //启动靠边停车 Module.StartExamItemManualAsync(ExamContext, ExamItemCodes.PullOver, null); IsTriggerPullOver = true; return; } RunOnUiThread(UpdateCarSensorState); } catch (Exception ex) { Logger.Error("HuaZhongSensorCarSignalReceived", ex.Message); } }
protected override void OnCarSignalReceived(CarSignalReceivedMessage message) { try { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } RunOnUiThread(() => { if (message.CarSignal.Gps.FixedSatelliteCount >= 3) { tvGps.Text = "GPS:正常"; } else { tvGps.Text = "GPS:异常"; } tvMileage.Text = string.Format("里程:{0:0}米", message.CarSignal.Distance); tvSpeed.Text = tvSpeed.Text = string.Format("速度:{0:0}Km/h", message.CarSignal.SpeedInKmh); }); } catch (Exception ex) { Logger.Error(ex, this.GetType().ToString()); } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { var signalInfo = message.CarSignal; //灯光模拟等在信号不正常情况下也能够使用; //if (Context == null || !Context.IsExaming || !signalInfo.IsValid) if (Context == null || !Context.IsExaming) { return; } ExecuteExamItems(signalInfo); if (IsRunning) { Logger.InfoFormat("搜索点位忽略,正在执行上个任务"); return; } if (signalInfo.IsGpsValid) { IsRunning = true; MatchMapPointsAsync(signalInfo).ContinueWith(x => { IsRunning = false; }); } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { carSignal = message.CarSignal; RunOnUiThread(UpdateCarSensorState); //更新界面UI 需要在UI线程操作 if (LightExamItem != null && LightExamItem.State == ExamItemState.Progressing) { LightExamItem.Execute(message.CarSignal); } }
protected void OnCarSignalReceived(CarSignalReceivedMessage message) { if (message == null || message.CarSignal != null) { return; } carSignal = message.CarSignal; RunOnUiThread(UpdateCarSensorState); }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { if (message.CarSignal == null) { return; } if (message.CarSignal.EngineRatio > 0) { this.EngineRatio = message.CarSignal.EngineRatio; } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { try { carSignal = message.CarSignal; RunOnUiThread(UpdateCarSensor); } catch (Exception ex) { logger.Error("CarSensorOnCarSignalReceived", ex.Message); } }
protected override void OnCarSignalReceived(CarSignalReceivedMessage message) { try { carSignal = message.CarSignal; RunOnUiThread(UpdateCarSensorState); } catch (Exception ex) { Logger.Error("BeiKeCarSignalReceived", ex.Message); } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { if (!FirstDateTime.HasValue) { FirstDateTime = DateTime.Now; } if ((DateTime.Now - FirstDateTime.Value).TotalMilliseconds >= TimespanMS) { TimespanMS = (DateTime.Now - FirstDateTime.Value).TotalMilliseconds; } carSingal = message.CarSignal; FirstDateTime = DateTime.Now; RunOnUiThread(TestUpdateUi); }
protected virtual void OnCarSignalReceived(CarSignalReceivedMessage message) { foreach (var trigger in Triggers.Where(x => x.IsRunning).OfType <CarSignalTrigger>()) { try { trigger.Execute(message.CarSignal); } catch (Exception exp) { // Logger.ErrorFormat("执行触发器{0}发生异常,原因:{1}", trigger.Name, exp, exp); } } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } carSignal = message.CarSignal; tempMessage = message; //更新界面UI 需要在UI线程操作 if (LightExamItem != null && LightExamItem.State == ExamItemState.Progressing) { LightExamItem.Execute(message.CarSignal); } RunOnUiThread(UpdateCarSensorState); }
//Todo:Gps会闪0,但是不是特别频繁故暂时不予处理。无效的Gps点位只要不记录在数据库中就可以了。 private void OnCarSignalReceived(CarSignalReceivedMessage message) { try { //如果Gps无效则不需要进行记录// if (message == null || message.CarSignal == null || !message.CarSignal.IsGpsValid) { return; } carSignal = message.CarSignal; RunOnUiThread(UpadteCarSignal); } catch (Exception ex) { Logger.Error("Map", ex.Message); } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { try { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } tempMessage = message; carSignal = message.CarSignal; RunOnUiThread(UpdateCarSensorState); } catch (Exception ex) { Logger.Error("SanLianCarSignalReceived", ex.Message); } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { try { carSignal = message.CarSignal; //if (carSignal.Distance>=dataService.GetSettings().ExamDistance&&dataService.GetSettings().EndExamByDistance) //{ // Module.StartExamItemManualAsync(ExamContext, ExamItemCodes.PullOver, null); //} RunOnUiThread(UpdateCarSensorState); } catch (Exception ex) { Logger.Error("DuoLunCarSignalReceived", ex.Message); } }
protected override void OnCarSignalReceived(CarSignalReceivedMessage message) { try { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } tempMessage = message; carSignal = message.CarSignal; RunOnUiThread(UpdateCarSensorState); base.OnCarSignalReceived(message); } catch (Exception ex) { Logger.Error(ExamUIName + "SensorCarSignalReceived", ex.Message); } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { try { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } tempMessage = message; carSignal = message.CarSignal; RunOnUiThread(UpdateCarSensorState); } catch (Exception ex) { Logger.Error(ex, GetType().ToString()); } }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { try { carSignal = message.CarSignal; //if (carSignal.Distance>=3000&&IsTriggerPullOver==false) //{ // ExamItemClick("靠边停车"); // IsTriggerPullOver = true; // btnStartPullOver.Enabled = false; // return; //} RunOnUiThread(UpdateCarSensorState); } catch (Exception ex) { Logger.Error("JingTangCarSignalReceived", ex.Message); } }
protected override void OnCarSignalReceived(CarSignalReceivedMessage message) { try { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } tempMessage = message; carSignal = message.CarSignal; RunOnUiThread(UpdateCarSensorState); base.OnCarSignalReceived(message); //地图加载 MapSecledOption(); //地图加载 if (message.CarSignal.Sensor.Brake) { if (btnStartExam.Text.Contains("继续")) { RunOnUiThread(() => { btnStartExam.Text = "结束考试"; }); } else if (btnPrepareOk.Text.Contains("继续")) { RunOnUiThread(() => { btnPrepareOk.Text = "结束考试"; }); } } } catch (Exception ex) { Logger.Error(ExamUIName + "SensorCarSignalReceived", ex.Message); } }
protected override void OnCarSignalReceived(CarSignalReceivedMessage message) { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } //正常考试应该不会进去 //点击开始考试LightExamItem //多测试多观察 if (LightExamItem != null && LightExamItem.State == ExamItemState.Progressing) { LightExamItem.Execute(message.CarSignal); } tempMessage = message; carSignal = message.CarSignal; //更新界面地图更改名字 MapSecledOption(); RunOnUiThread(() => { UpdateCarSensorState(); }); }
private void OnCarSignalReceived(CarSignalReceivedMessage message) { try { if (message.CarSignal == null || message.CarSignal.Gps == null) { return; } if (DataBase.IsLeaseScheme && !DataBase.CanUse()) { speaker.PlayAudioAsync("请购买模拟训练学时"); //结束考试 RunOnUiThread(ExamFinishing); return; } tempMessage = message; carSignal = message.CarSignal; //if (carSignal.Distance >= ExamDistance && IsAutoTriggerPullOver && IsTriggerPullOver == false) //{ // //启动靠边停车 // Module.StartExamItemManualAsync(ExamContext, ExamItemCodes.PullOver, null); // IsTriggerPullOver = true; // return; //} RunOnUiThread(UpdateCarSensorState); } catch (Exception ex) { Logger.Error("DuoLunSensorCarSignalReceived", ex.Message); } }
protected virtual void OnCarSignalReceived(CarSignalReceivedMessage message) { }