コード例 #1
0
ファイル: UnlockForm.cs プロジェクト: wwj229/NLock
        private void OnCapturingCompleted(IAsyncResult ar)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new AsyncCallback(OnCapturingCompleted), ar);
            }
            else
            {
                try
                {
                    var status = _biometricClient.EndCapture(ar);

                    if (status != NBiometricStatus.Ok)
                    {
                        CaptureFailedFormSettings();
                        _subject.Faces[0].Image = null;
                        _currentop = Ops.Capturingfailed;
                    }
                    else
                    {
                        _currentop = Ops.Ongoing;

                        _biometricClient.BeginVerify(_subjectFromFile, _subject, OnVerifyCompleted, null);
                    }
                }
                catch (Exception)
                {
                    _biometricClient.Cancel();
                    CheckCamera();
                    CheckLicense();
                    Close();
                }
            }
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: tulp123/Biometrics
 private void MainFormFormClosing(object sender, FormClosingEventArgs e)
 {
     if (_biometricClient != null)
     {
         _biometricClient.Cancel();
     }
 }
コード例 #3
0
 private void FormCaptureSingleScannerFinger_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (_EnrollFromSingleFingerScanner != null)
     {
         _EnrollFromSingleFingerScanner.DisposeNLComponents();
     }
     if (_biometricClient != null)
     {
         _biometricClient.Cancel();
     }
     NLicense.ReleaseComponents(FingerprintComponents);
 }
コード例 #4
0
ファイル: LockForm.cs プロジェクト: wwj229/NLock
        private void ButtonMainClick(object sender, EventArgs e)
        {
            switch (_enumoperation)
            {
            case Modes.Initialization:
                CapturingOperationRest();
                break;

            case Modes.Capturing:
                _biometricClient.Cancel();
                _enumoperation = Modes.Initialization;
                break;

            case Modes.Capturesuccess:
            case Modes.Capturesuccessnopassword:
                tboxFileName.Focus();
                if (!_cboxSkipPWcheckState && !AddPassword)
                {
                    CaptureSuccessClosing();
                    if (AddPassword)
                    {
                        FormClose();
                    }
                }
                else
                {
                    FormClose();
                }

                break;

            case Modes.Invalidpath:
                FormClose();
                break;

            default:
                TemplateLoginForm = null;
                Password          = null;
                AddPassword       = false;
                DialogResult      = DialogResult.Cancel;
                break;
            }
        }
コード例 #5
0
 private void cancelScanningButton_Click(object sender, EventArgs e)
 {
     _biometricClient.Cancel();
     EnableHuellaControls(false);
 }
コード例 #6
0
 private void BtnStopClick(object sender, EventArgs e)
 {
     _biometricClient.Cancel();
     EnableControls(false);
 }
コード例 #7
0
 private void FormCapturePhotograph_FormClosing(object sender, FormClosingEventArgs e)
 {
     _biometricClient?.Cancel();
     NLicense.ReleaseComponents(_faceComponents);
 }