Exemplo n.º 1
0
        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();
                }
            }
        }
Exemplo n.º 2
0
 private void MainFormFormClosing(object sender, FormClosingEventArgs e)
 {
     if (_biometricClient != null)
     {
         _biometricClient.Cancel();
     }
 }
 private void FormCaptureSingleScannerFinger_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (_EnrollFromSingleFingerScanner != null)
     {
         _EnrollFromSingleFingerScanner.DisposeNLComponents();
     }
     if (_biometricClient != null)
     {
         _biometricClient.Cancel();
     }
     NLicense.ReleaseComponents(FingerprintComponents);
 }
Exemplo n.º 4
0
        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;
            }
        }
Exemplo n.º 5
0
 private void cancelScanningButton_Click(object sender, EventArgs e)
 {
     _biometricClient.Cancel();
     EnableHuellaControls(false);
 }
Exemplo n.º 6
0
 private void BtnStopClick(object sender, EventArgs e)
 {
     _biometricClient.Cancel();
     EnableControls(false);
 }
Exemplo n.º 7
0
 private void FormCapturePhotograph_FormClosing(object sender, FormClosingEventArgs e)
 {
     _biometricClient?.Cancel();
     NLicense.ReleaseComponents(_faceComponents);
 }