private void buttonCaptureSample_Click(object sender, EventArgs e) { ThreadPool.QueueUserWorkItem(delegate { Bitmap image; WinBioRejectDetail rejectDetail; Log("Capturing sample..."); try { WinBio.CaptureSample(_session, WinBioBirPurpose.NoPurposeAvailable, WinBioBirDataFlags.Raw, out rejectDetail, out image); if (rejectDetail != WinBioRejectDetail.None) { Log(string.Format("CaptureSample failed! Reject detail: {0}", rejectDetail)); } else { Log("Captured sample successfully!"); this.fingerprintPictureBox.BackgroundImage = image; } } catch (WinBioException ex) { Log(ex); } }); }
public void CaptureSample(WinBioBirPurpose purpose, WinBioBirDataFlags dataFlags) { Bitmap image; WinBioRejectDetail rejectDetail; var unitId = WinBio.CaptureSample(_handle, purpose, dataFlags, out rejectDetail, out image); Console.WriteLine("Unit id: {0}", unitId); Console.WriteLine("Captured sample size: {0}x{1}", image.Width, image.Height); Console.WriteLine("Reject details: {0}", rejectDetail); }
public void CaptureSample(WinBioBirPurpose purpose, WinBioBirDataFlags dataFlags) { int sampleSize; WinBioRejectDetail rejectDetail; var unitId = WinBio.CaptureSample(_handle, purpose, dataFlags, out sampleSize, out rejectDetail); Console.WriteLine("Unit id: {0}", unitId); Console.WriteLine("Captured sample size: {0}", sampleSize); Console.WriteLine("Reject details: {0}", rejectDetail); }