Example #1
0
 public void OnComplete(object Capture, string ReaderSerialNumber, DPFP.Sample Sample)
 {
     if (rdleft.Checked)
     {
         FingerPrintScanner.DrawPicture(pic_left, FingerPrintScanner.ConvertSampleToBitmap(Sample));
     }
     else
     {
         FingerPrintScanner.DrawPicture(pic_Right, FingerPrintScanner.ConvertSampleToBitmap(Sample));
     }
 }
Example #2
0
        public void OnComplete(object Capture, string ReaderSerialNumber, DPFP.Sample Sample)
        {
            FingerPrintScanner.DrawPicture(pic_left, FingerPrintScanner.ConvertSampleToBitmap(Sample));
            try
            {
                FeatureSet feature = FingerPrintScanner.ExtractFeatures(Sample, DataPurpose.Enrollment);
                enroller.AddFeatures(feature);
                FingerPrintScanner.MakeReport(txtStatus, String.Format("Fingerprint samples needed: {0}", enroller.FeaturesNeeded));
                switch (enroller.TemplateStatus)
                {
                case Enrollment.Status.Failed:
                    FingerPrintScanner.MakeReport(txtStatus, String.Format("Fingerprint samples needed: {0}", enroller.FeaturesNeeded));
                    break;

                case Enrollment.Status.Insufficient:
                    break;

                case Enrollment.Status.Ready:
                    FingerPrintScanner.MakeReport(txtStatus, String.Format("Fingerprint samples needed: {0}", enroller.FeaturesNeeded));
                    capture.StopCapture();
                    FingerPrintScanner.MakeTemplate(enroller.Template, this);
                    break;

                case Enrollment.Status.Unknown:
                    FingerPrintScanner.MakeReport(txtStatus, String.Format("Fingerprint samples needed: {0}", enroller.FeaturesNeeded));
                    break;

                default:
                    FingerPrintScanner.MakeReport(txtStatus, String.Format("Fingerprint samples needed: {0}", enroller.FeaturesNeeded));
                    break;
                }
            }
            catch (Exception)
            {
                FingerPrintScanner.MakeReport(txtStatus, String.Format("Fingerprint samples needed: {0}", enroller.FeaturesNeeded));
                capture.StopCapture();
                enroller.Clear();
                capture.StartCapture();
            }
        }