private void enrollment_OnCaptured(DPCtlUruNet.EnrollmentControl enrollmentControl, CaptureResult captureResult, int fingerPosition) { if (enrollmentControl.Reader != null) { ShowMessage("OnCaptured: " + enrollmentControl.Reader.Description.Name + ", finger " + fingerPosition + ", quality " + captureResult.Quality.ToString()); } else { ShowMessage("OnCaptured: No Reader Connected, finger " + fingerPosition); } if (captureResult.ResultCode != Constants.ResultCode.DP_SUCCESS) { if (Currentinstance.CurrentReader != null) { Currentinstance.CurrentReader.Dispose(); Currentinstance.CurrentReader = null; } // Disconnect reader from enrollment control. _enrollmentControl.Reader = null; MessageBox.Show("Error: " + captureResult.ResultCode); btnCancel.Enabled = false; } else { if (pbFingerprint.Image != null) { pbFingerprint.Image.Dispose(); pbFingerprint.Image = null; } foreach (Fid.Fiv fiv in captureResult.Data.Views) { pbFingerprint.Image = CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height); } if (Currentinstance.Fids.ContainsKey(fingerPosition)) { List <Fid> fds = Currentinstance.Fids[fingerPosition]; fds.Add(captureResult.Data); // MessageBox.Show("Add New FID for finger "+fingerPosition+" Total count:"+fds.Count ); } else { List <Fid> fds = new List <Fid>(); fds.Add(captureResult.Data); Currentinstance.Fids.Add(fingerPosition, fds); // MessageBox.Show("Add New FID for finger " + fingerPosition + " Total count:" + fds.Count); } } }
private void enrollment_OnCancel(DPCtlUruNet.EnrollmentControl enrollmentControl, Constants.ResultCode result, int fingerPosition) { if (enrollmentControl.Reader != null) { ShowMessage("OnCancel: " + enrollmentControl.Reader.Description.Name + ", finger " + fingerPosition); } else { ShowMessage("OnCancel: No Reader Connected, finger " + fingerPosition); } btnCancel.Enabled = false; }
private void enrollment_OnDelete(DPCtlUruNet.EnrollmentControl enrollmentControl, Constants.ResultCode result, int fingerPosition) { if (enrollmentControl.Reader != null) { ShowMessage("OnDelete: " + enrollmentControl.Reader.Description.Name + ", finger " + fingerPosition); } else { ShowMessage("OnDelete: No Reader Connected, finger " + fingerPosition); } Currentinstance.Fmds.Remove(fingerPosition); Currentinstance.Fids.Remove(fingerPosition); if (Currentinstance.Fmds.Count == 0) { } // currentinstance.btnIdentificationControl.Enabled = false; }
private void enrollment_OnDelete(DPCtlUruNet.EnrollmentControl enrollmentControl, Constants.ResultCode result, int fingerPosition) { if (enrollmentControl.Reader != null) { SendMessage("OnDelete: " + enrollmentControl.Reader.Description.Name + ", finger " + fingerPosition); SendMessage("Enrolled Finger Mask: " + _enrollmentControl.EnrolledFingerMask); SendMessage("Disabled Finger Mask: " + _enrollmentControl.DisabledFingerMask); } else { SendMessage("OnDelete: No Reader Connected, finger " + fingerPosition); } _sender.Fmds.Remove(fingerPosition); if (_sender.Fmds.Count == 0) { _sender.btnIdentificationControl.Enabled = false; } }
private void enrollment_OnEnroll(DPCtlUruNet.EnrollmentControl enrollmentControl, DataResult <Fmd> result, int fingerPosition) { if (enrollmentControl.Reader != null) { ShowMessage("OnEnroll: " + enrollmentControl.Reader.Description.Name + ", finger " + fingerPosition); } else { ShowMessage("OnEnroll: No Reader Connected, finger " + fingerPosition); } if (result != null && result.Data != null) { // Fmd.SerializeXml(result.Data); Currentinstance.Fmds.Add(fingerPosition, result.Data); } btnCancel.Enabled = false; // currentinstance.btnIdentificationControl.Enabled = true; }
private void enrollment_OnEnroll(DPCtlUruNet.EnrollmentControl enrollmentControl, DataResult <Fmd> result, int fingerPosition) { if (enrollmentControl.Reader != null) { SendMessage("OnEnroll: " + enrollmentControl.Reader.Description.Name + ", finger " + fingerPosition); SendMessage("Enrolled Finger Mask: " + _enrollmentControl.EnrolledFingerMask); SendMessage("Disabled Finger Mask: " + _enrollmentControl.DisabledFingerMask); } else { SendMessage("OnEnroll: No Reader Connected, finger " + fingerPosition); } if (result != null && result.Data != null) { _sender.Fmds.Add(fingerPosition, result.Data); } btnCancel.Enabled = false; _sender.btnIdentificationControl.Enabled = true; }
private void EnrollmentControl_Load(object sender, EventArgs e) { if (_enrollmentControl == null) { _enrollmentControl = new DPCtlUruNet.EnrollmentControl(Currentinstance.CurrentReader, Constants.CapturePriority.DP_PRIORITY_COOPERATIVE); _enrollmentControl.BackColor = System.Drawing.SystemColors.Window; _enrollmentControl.Location = new System.Drawing.Point(3, 3); _enrollmentControl.Name = "ctlEnrollmentControl"; _enrollmentControl.Size = new System.Drawing.Size(482, 346); _enrollmentControl.TabIndex = 0; _enrollmentControl.OnCancel += new DPCtlUruNet.EnrollmentControl.CancelEnrollment(this.enrollment_OnCancel); _enrollmentControl.OnCaptured += new DPCtlUruNet.EnrollmentControl.FingerprintCaptured(this.enrollment_OnCaptured); _enrollmentControl.OnDelete += new DPCtlUruNet.EnrollmentControl.DeleteEnrollment(this.enrollment_OnDelete); _enrollmentControl.OnEnroll += new DPCtlUruNet.EnrollmentControl.FinishEnrollment(this.enrollment_OnEnroll); _enrollmentControl.OnStartEnroll += new DPCtlUruNet.EnrollmentControl.StartEnrollment(this.enrollment_OnStartEnroll); } else { _enrollmentControl.Reader = Currentinstance.CurrentReader; } this.Controls.Add(_enrollmentControl); }
private void enrollment_OnCaptured(DPCtlUruNet.EnrollmentControl enrollmentControl, CaptureResult captureResult, int fingerPosition) { if (enrollmentControl.Reader != null) { SendMessage("OnCaptured: " + enrollmentControl.Reader.Description.Name + ", finger " + fingerPosition + ", quality " + captureResult.Quality.ToString()); } else { SendMessage("OnCaptured: No Reader Connected, finger " + fingerPosition); } if (captureResult.ResultCode != Constants.ResultCode.DP_SUCCESS) { if (_sender.CurrentReader != null) { _sender.CurrentReader.Dispose(); _sender.CurrentReader = null; } // Disconnect reader from enrollment control _enrollmentControl.Reader = null; MessageBox.Show("Error: " + captureResult.ResultCode); btnCancel.Enabled = false; } else { if (captureResult.Data != null) { foreach (Fid.Fiv fiv in captureResult.Data.Views) { pbFingerprint.Image = _sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height); } } } }