private void Registration_Load(object sender, System.EventArgs e) { this.nameTextBox.Focus(); txtEnroll.Text = string.Empty; preenrollmentFmds = new List <Fmd>(); count = 0; SendMessage(Action.SendMessage, "Place your Right Thumb on the device."); if (!_sender.OpenReader()) { //this.Close(); this.txtEnroll.Visible = false; this.enrollPictureBox.Visible = false; this.deviceNotConnected.Visible = true; } else { this.deviceNotConnected.Visible = false; } if (!_sender.StartCaptureAsync(this.OnCaptured)) { //this.Close(); this.txtEnroll.Visible = false; this.enrollPictureBox.Visible = false; this.deviceNotConnected.Visible = true; } else { this.deviceNotConnected.Visible = false; } }
private void Edit_Data_Load(object sender, EventArgs e) { this.nameTextBox.Focus(); preenrollmentFmds = new List <Fmd>(); GetData(); SendMessage(Action.SendMessage, "Place your Right Thumb on the device."); if (!_sender.OpenReader()) { //this.Close(); this.txtEnroll.Visible = false; this.enrollPictureBox.Visible = false; this.deviceNotConnected.Visible = true; } else { this.deviceNotConnected.Visible = false; } if (!_sender.StartCaptureAsync(this.OnCaptured)) { //this.Close(); this.txtEnroll.Visible = false; this.enrollPictureBox.Visible = false; this.deviceNotConnected.Visible = true; } else { this.deviceNotConnected.Visible = false; } }
private void Stream_Shown(object sender, EventArgs e) { Application.DoEvents(); pbFingerprint.Image = null; if (!_sender.OpenReader()) { MessageBox.Show("Cannot open this reader in this environment."); this.Close(); return; } if (!_sender.CurrentReader.Capabilities.CanStream) { MessageBox.Show("This reader cannot stream in this environment."); return; } _sender.CurrentReader.StartStreaming(); CaptureResult captureResult = null; reset = false; while ((!reset)) { captureResult = _sender.CurrentReader.GetStreamImage(Constants.Formats.Fid.ANSI, Constants.CaptureProcessing.DP_IMG_PROC_DEFAULT, _sender.CurrentReader.Capabilities.Resolutions[0]); Application.DoEvents(); if (captureResult.ResultCode != Constants.ResultCode.DP_SUCCESS) { if (_sender.CurrentReader != null) { _sender.CurrentReader.Dispose(); _sender.CurrentReader = null; } reset = true; MessageBox.Show("Error: " + captureResult.ResultCode.ToString()); } if (captureResult.Data != null) { foreach (Fid.Fiv fiv in captureResult.Data.Views) { SendMessage(_sender.CreateBitmap(fiv.RawImage, fiv.Width, fiv.Height)); } } } }
/// <summary> /// Initialize the form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Capture_Load(object sender, EventArgs e) { // Reset variables pbFingerprint.Image = null; if (!_sender.OpenReader()) { this.Close(); } if (!_sender.StartCaptureAsync(this.OnCaptured)) { this.Close(); } }
/// <summary> /// Initialize the form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Identification_Load(object sender, System.EventArgs e) { getData(); txtIdentify.Text = string.Empty; anyFinger = null; if (!_sender.OpenReader()) { this.Close(); } if (!_sender.StartCaptureAsync(this.OnCaptured)) { this.Close(); } }
/// <summary> /// Initialize the form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Enrollment_Load(object sender, System.EventArgs e) { txtEnroll.Text = string.Empty; preenrollmentFmds = new List <Fmd>(); count = 0; SendMessage(Action.SendMessage, "Place a finger on the reader."); if (!_sender.OpenReader()) { this.Close(); } if (!_sender.StartCaptureAsync(this.OnCaptured)) { this.Close(); } }
/// <summary> /// Initialize the form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Verification_Load(object sender, System.EventArgs e) { txtVerify.Text = string.Empty; firstFinger = null; secondFinger = null; count = 0; SendMessage(Action.SendMessage, "Place a finger on the reader."); if (!_sender.OpenReader()) { this.Close(); } if (!_sender.StartCaptureAsync(this.OnCaptured)) { this.Close(); } }
/// <summary> /// Initialize the form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Identification_Load(object sender, System.EventArgs e) { txtIdentify.Text = string.Empty; rightIndex = null; rightThumb = null; anyFinger = null; count = 0; SendMessage(Action.SendMessage, "Place your right index finger on the reader."); if (!_sender.OpenReader()) { this.Close(); } if (!_sender.StartCaptureAsync(this.OnCaptured)) { this.Close(); } }
/// <summary> /// Initialize the form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Capture_Load(object sender, EventArgs e) { try { // Reset variables pbFingerprint.Image = null; if (!_sender.OpenReader()) { this.Close(); } if (!_sender.StartCaptureAsync(this.OnCaptured)) { this.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); this.Close(); } }