protected override void Process(DPFP.Sample Sample) { try { // Draw fingerprint sample image. DrawPicture(ConvertSampleToBitmap(Sample)); // Process the sample and create a feature set for the enrollment purpose. DPFP.FeatureSet features = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Verification); // Check quality of the sample and start verification if it's good // TODO: move to a separate task if (features != null) { DPFP.Verification.Verification.Result result = new DPFP.Verification.Verification.Result(); bool found = false; int index = 0; // Compare the feature set with each of our template for (int i = 0; i < Templates.Count; i++) { var template = Templates[i]; Verificator.Verify(features, template, ref result); if (result.Verified) { found = true; MakeReport("VERIFIED SUCCESSFULLY."); Staff = Fingerprints[i].Staff; this.Invoke(new Function(delegate() { this.StaffVerified?.Invoke(this, new EventArgs()); })); Start(); break; } index++; } if (!found) { MakeReport("VERIFY FAILED."); Start(); } } } catch (Exception ex) { MessageBox.Show("An error occured while comparing with fingerprint database. \n\r\n\r" + ex.ToString()); } }
private void dgridUsers_CellContentClick(object sender, DataGridViewCellEventArgs e) { var senderGrid = (DataGridView)sender; if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0) { SelectedStaff = Staffs[e.RowIndex]; this.UserSelected?.Invoke(this, e); } }
public ucEnrolFingerprint(Stafftab _staff) { Staff = _staff; this.Load += UcEnrolFingerprint_Load; this.ControlRemoved += UcEnrolFingerprint_ControlRemoved; }
public ucUserDetails(Stafftab _Staff) { Staff = _Staff; InitializeComponent(); }