Пример #1
0
        private void Goto_Tick(object sender, EventArgs e)
        {
            helper.Disconnect();
            gotoTimer.Stop();
            DispatcherTimer dispatcherTimer = (DispatcherTimer)sender;

            if (dispatcherTimer.Tag.Equals("success"))
            {
                //hendersonVisitor.IdCardNo = "123";
                //hendersonVisitor.Name = "abc";
                //hendersonVisitor.VisitorPhoto = @"E:\MyWork\WFC.SelfServeClient\WFC.SelfServeClient\Resources\sfzh.png"; //idCardInfo.ImagePath;
                OnGotoInputInfoClick?.Invoke();
            }
            else
            {
                if (failedTimes >= 3)
                {
                    snapshotTimer.Stop();
                    OnGotoWelcomeClick?.Invoke();
                }
                else
                {
                    helper.Connect();
                    snapshotTimer.Start();
                }
            }
        }
        private void Snapshot_Tick(object sender, EventArgs e)
        {
            try
            {
                idCardInfo = IdCardReaderHelper.ReadIdCard();
            }
            catch (Exception ex)
            {
                Logger.Error(ex.ToString());
                //  return;
                //暂不处理
            }
            if (idCardInfo == null)
            {
                snapshotTimer_count = snapshotTimer_count + 1;
            }
            else
            {
                IdentityhendersonVisitor.IdCardNo     = idCardInfo.Code;
                IdentityhendersonVisitor.Name         = idCardInfo.Name;
                IdentityhendersonVisitor.VisitorPhoto = idCardInfo.ImagePath;
                IdentityhendersonVisitor.Gender       = idCardInfo.Gender;
                IdentityhendersonVisitor.Nation       = idCardInfo.Nation;
                snapshotTimer.Stop();
                ////身份证头像获取成功,跳转页面
                OnConfirmInfo?.Invoke();
            }
            ////身份证头像获取成功,开始摄像头抓拍
            //helper.Snapshot();

            if (snapshotTimer_count > 60 / snapshotTimer_timespan)
            {
                snapshotTimer.Stop();
                OnGotoWelcomeClick?.Invoke();
            }
        }
 public void GoBack()
 {
     snapshotTimer.Stop();
     OnGotoWelcomeClick?.Invoke();
 }
 public void GoBack()
 {
     gotoWelcomeTimer.Stop();
     OnGotoWelcomeClick?.Invoke();
 }
 public void FinishButtonClick()
 {
     gotoWelcomeTimer.Stop();
     OnGotoWelcomeClick?.Invoke();
 }
 public void GoBack()
 {
     OnGotoWelcomeClick?.Invoke();
 }
 private void Snapshot_Tick(object sender, EventArgs e)
 {
     //  gotoWelcomeTimer.Stop();
     OnGotoWelcomeClick?.Invoke();
 }