Ejemplo n.º 1
0
 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);
         }
     }
 }
Ejemplo n.º 2
0
        private void FormCapturePhotograph_Load(object sender, EventArgs e)
        {
            try
            {
                _biometricClient = new NBiometricClient {
                    BiometricTypes = NBiometricType.Face, UseDeviceManager = true, FacesCheckIcaoCompliance = true
                };
                _biometricClient.Initialize();

                _enrollFromCamera = new EnrollFromCamera
                {
                    CapturePhotoNotifyer = _CapturePhotoNotifyer,
                    Dock            = DockStyle.Fill,
                    BiometricClient = _biometricClient
                };

                Controls.Add(_enrollFromCamera);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                AppErrorLogger.LogError(ex.StackTrace, ex.Source, ex.Message);
                if (ex.InnerException != null)
                {
                    AppErrorLogger.LogError(ex.StackTrace, ex.Source, ex.Message);
                }
            }
        }