예제 #1
0
파일: UnlockForm.cs 프로젝트: wwj229/NLock
 private void OnVerifyCompleted(IAsyncResult ar)
 {
     if (InvokeRequired)
     {
         BeginInvoke(new AsyncCallback(OnVerifyCompleted), ar);
     }
     else
     {
         try
         {
             lblInfo.Text = Resources.Verifying_user___;
             var status = _biometricClient.EndVerify(ar);
             Logger.Debug(status);
             if (status == NBiometricStatus.Ok)
             {
                 _currentop   = Ops.Verified;
                 Verified     = true;
                 DialogResult = DialogResult.OK;
             }
             else
             {
                 Verified = false;
                 EnableRetryCounter();
                 if (PwHash != null || _firstTry)
                 {
                     VeriFailedButtonConfig();
                     _firstTry = false;
                 }
                 _currentop   = Ops.Verificationfailedretry;
                 lblInfo.Text = Resources.User_verification_failed___;
             }
         }
         catch (Exception)
         {
             CheckCamera();
             CheckLicense();
             throw;
         }
     }
 }