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(); } } }
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); }
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; } }
private void cancelScanningButton_Click(object sender, EventArgs e) { _biometricClient.Cancel(); EnableHuellaControls(false); }
private void BtnStopClick(object sender, EventArgs e) { _biometricClient.Cancel(); EnableControls(false); }
private void FormCapturePhotograph_FormClosing(object sender, FormClosingEventArgs e) { _biometricClient?.Cancel(); NLicense.ReleaseComponents(_faceComponents); }