private void SoundVoiceAlerm(SuspeciousCarAlermInfo alerm) { var textToSpeak = string.Format(Properties.Settings.Default.VoiceAlertTemplate, alerm.CapturedLicenseInfo.LicensePlateNumber); _speaker = SpeakService.Speak(textToSpeak); }
public void LicensePlateCaptured(LicensePlateInfo licensePlateInfo) { _licensePlateCheckService.Check(licensePlateInfo.LicensePlateNumber, result=> { if (result.IsSuspecious) { var alerm = new SuspeciousCarAlermInfo() { CapturedLicenseInfo = licensePlateInfo, ReportedCarInfo = result }; foreach (var l in _suspeciousLicensePlateObserver) { try { l.Notify(alerm); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } } }); }
public void LicensePlateCaptured(LicensePlateInfo licensePlateInfo) { _licensePlateCheckService.Check(licensePlateInfo.LicensePlateNumber, result => { if (result.IsSuspecious) { var alerm = new SuspeciousCarAlermInfo() { CapturedLicenseInfo = licensePlateInfo, ReportedCarInfo = result }; foreach (var l in _suspeciousLicensePlateObserver) { try { l.Notify(alerm); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } } }); }
private void SoundVoiceAlerm(SuspeciousCarAlermInfo alerm) { var textToSpeak = string.Format(Properties.Settings.Default.VoiceAlertTemplate, alerm.CapturedLicenseInfo.LicensePlateNumber); _speaker = SpeakService.Speak(textToSpeak); }
public static void UpdateSuspectCarAlerm(Controls.SuspectCarControl suspectCarControl, SuspeciousCarAlermInfo value) { suspectCarControl.carImage.Image = value.CapturedLicenseInfo.LoadImage(); suspectCarControl.licenseNumber.EditValue = value.CapturedLicenseInfo.LicensePlateNumber; suspectCarControl.captureTime.EditValue = value.CapturedLicenseInfo.CaptureTime; suspectCarControl.reportedMissingType.EditValue = value.ReportedCarInfo.CarInfo.CarMissingType.GetDescription(); suspectCarControl.addTime.EditValue = value.ReportedCarInfo.CarInfo.SetupTime; suspectCarControl.gdViewer1.DisplayFromFile(value.CapturedLicenseInfo.LicensePlateImageFileAbsolutePath); var rect = value.CapturedLicenseInfo.LicensePlateRect; suspectCarControl.gdViewer1.ZoomArea(rect.X, rect.Y, rect.Width, rect.Height); suspectCarControl.gdViewer1.Select(); }
public void Notify(SuspeciousCarAlermInfo alerm) { _currentAlerm = alerm; SoundVoiceAlerm(_currentAlerm); Func<System.Windows.Forms.Form> doit = () => { var form = new FormSuspeciousCar(); form.DataContext = _currentAlerm; form.AttachPresenter(this); return form; }; _messageBoxService.ShowForm(doit); }
public void Notify(SuspeciousCarAlermInfo alerm) { _currentAlerm = alerm; SoundVoiceAlerm(_currentAlerm); Func <System.Windows.Forms.Form> doit = () => { var form = new FormSuspeciousCar(); form.DataContext = _currentAlerm; form.AttachPresenter(this); return(form); }; _messageBoxService.ShowForm(doit); }
public SuspectCarAlermHandleInfo(SuspeciousCarAlermInfo alermInfo) { AlermInfo = alermInfo; HandleTime = DateTime.Now; }
public SuspectCarQueryInfo(SuspeciousCarAlermInfo alermInfo) { AlermInfo = alermInfo; }
public SuspectCarAlermHandleInfo(SuspeciousCarAlermInfo alermInfo) { AlermInfo = alermInfo; HandleTime = DateTime.Now; }
public SuspectCarQueryInfo(SuspeciousCarAlermInfo alermInfo) { AlermInfo = alermInfo; }
public static void UpdateSuspectCarAlerm(Controls.SuspectCarControl suspectCarControl, SuspeciousCarAlermInfo value) { suspectCarControl.carImage.Image = value.CapturedLicenseInfo.LoadImage(); suspectCarControl.licenseNumber.EditValue = value.CapturedLicenseInfo.LicensePlateNumber; suspectCarControl.captureTime.EditValue = value.CapturedLicenseInfo.CaptureTime; suspectCarControl.reportedMissingType.EditValue = value.ReportedCarInfo.CarInfo.CarMissingType.GetDescription(); suspectCarControl.addTime.EditValue = value.ReportedCarInfo.CarInfo.SetupTime; suspectCarControl.gdViewer1.DisplayFromFile(value.CapturedLicenseInfo.LicensePlateImageFileAbsolutePath); var rect = value.CapturedLicenseInfo.LicensePlateRect; suspectCarControl.gdViewer1.ZoomArea(rect.X, rect.Y, rect.Width, rect.Height); suspectCarControl.gdViewer1.Select(); }