コード例 #1
0
        private void SoundVoiceAlerm(SuspeciousCarAlermInfo alerm)
        {
            var textToSpeak = string.Format(Properties.Settings.Default.VoiceAlertTemplate,
                                            alerm.CapturedLicenseInfo.LicensePlateNumber);

            _speaker = SpeakService.Speak(textToSpeak);
        }
コード例 #2
0
        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());
                            }

                        }
                    }
                });
        }
コード例 #3
0
        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());
                        }
                    }
                }
            });
        }
コード例 #4
0
        private void SoundVoiceAlerm(SuspeciousCarAlermInfo alerm)
        {
            var textToSpeak = string.Format(Properties.Settings.Default.VoiceAlertTemplate,
                                            alerm.CapturedLicenseInfo.LicensePlateNumber);

            _speaker = SpeakService.Speak(textToSpeak);
        }
コード例 #5
0
ファイル: Helper.cs プロジェクト: dalinhuang/appcollection
        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();
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        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);
        }
コード例 #8
0
 public SuspectCarAlermHandleInfo(SuspeciousCarAlermInfo alermInfo)
 {
     AlermInfo = alermInfo;
     HandleTime = DateTime.Now;
 }
コード例 #9
0
 public SuspectCarQueryInfo(SuspeciousCarAlermInfo alermInfo)
 {
     AlermInfo = alermInfo;
 }
コード例 #10
0
 public SuspectCarAlermHandleInfo(SuspeciousCarAlermInfo alermInfo)
 {
     AlermInfo  = alermInfo;
     HandleTime = DateTime.Now;
 }
コード例 #11
0
 public SuspectCarQueryInfo(SuspeciousCarAlermInfo alermInfo)
 {
     AlermInfo = alermInfo;
 }
コード例 #12
0
        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();
        }