Example #1
0
        private async System.Threading.Tasks.Task OnCapturingFaceCompletedAsync(NBiometricStatus status)
        {
            try
            {
                // If Stop button was pushed
                if (status == NBiometricStatus.Canceled)
                {
                    return;
                }

                lblStatus.Text = status.ToString();
                if (status != NBiometricStatus.Ok)
                {
                    // Since capture failed start capturing again
                    _subjectFace.Faces[0].Image = null;
                    status = await _biometricClient.CaptureAsync(_subjectFace);
                    await OnCapturingFaceCompletedAsync(status);
                }
                else
                {
                    EnableFaceControls(false);
                }
            }
            catch (Exception ex)
            {
                //Utils.ShowException(ex);
                lblStatus.Text = string.Empty;
                //lblQuality.Text = string.Empty;
                EnableFaceControls(false);
            }
        }