/// <summary> /// 通过串口获取LED屏 /// </summary> /// <param name="comPort"></param> /// <returns></returns> private VehicleLed GetVehicleLed(byte comPort) { if (!_VehicleLeds.ContainsKey(comPort)) { VehicleLed led = new VehicleLed(comPort); led.Open(); _VehicleLeds.Add(comPort, led); } return(_VehicleLeds[comPort]); }
private void ReportRender(CardEventReport report) { try { if (_VehicleLed == null) { if (AppSettings.CurrentSetting.VehicleLedCOMPort > 0) { _VehicleLed = new VehicleLed(AppSettings.CurrentSetting.VehicleLedCOMPort); _VehicleLed.Open(); } } if (_VehicleLed != null) { _VehicleLed.DisplayVehicleInfo(report.Department, report.OwnerName, report.CardCarPlate, report.IsExitEvent); } } catch (Exception ex) { ExceptionPolicy.HandleException(ex); } }