private async void MainFormLoadAsync(object sender, EventArgs e) { _biometricClient = new NBiometricClient { BiometricTypes = NBiometricType.Face, UseDeviceManager = true, FacesCheckIcaoCompliance = true, FacesQualityThreshold = byte.Parse("0"), }; await _biometricClient.InitializeAsync(); if (!DesignMode) { try { nViewZoomSlider1.View = fvPreview; lblStatus.Text = string.Empty; _deviceManager = _biometricClient.DeviceManager; saveImageDialog.Filter = NImages.GetSaveFileFilterString(); UpdateCameraList(); } catch (Exception ex) { Utils.ShowException(ex); } } }
private void SaveImageButtonClick(object sender, EventArgs e) { if (_nfView.Finger.Image == null) { return; } saveFileDialog.Filter = NImages.GetSaveFileFilterString(); saveFileDialog.Title = @"Save Image File"; if (saveFileDialog.ShowDialog() != DialogResult.OK) { return; } var fileName = saveFileDialog.FileName; try { _subjectFinger.Image.Save(fileName); } catch (Exception ex) { MessageBox.Show(string.Format("Error saving to file \"{0}\": {1}", fileName, ex), Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void EnrollFromCameraLoad(object sender, EventArgs e) { try { if (!DesignMode) { try { lblStatus.Text = string.Empty; _deviceManager = _biometricClient.DeviceManager; saveImageDialog.Filter = NImages.GetSaveFileFilterString(); UpdateCameraList(); StartCapturing(); } catch (Exception ex) { AppUtils.ShowException(ex); } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); AppErrorLogger.LogError(ex.StackTrace, ex.Source, ex.Message); if (ex.InnerException != null) { AppErrorLogger.LogError(ex.StackTrace, ex.Source, ex.Message); } } }
private void EnrollFromScannerLoad(object sender, EventArgs e) { Invoke(new Action(() => { try { _deviceManager = _biometricClient.DeviceManager; UpdateScannerList(); saveFileDialog.Filter = NImages.GetSaveFileFilterString(); _nfView = new NFingerView { Dock = DockStyle.Fill, AutoScroll = true }; panel.Controls.Add(_nfView); StartCapturing(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } })); }
public EnrollFromCamera() { //_template = template; InitializeComponent(); saveImageDialog.Filter = NImages.GetSaveFileFilterString(); }