我正在尝试从Thumb Impression设备预览图片框中的图像。我在按钮点击上成功完成此操作,在按钮点击时显示我的拇指图像。但我的要求是,当我握住我的拇指时,它应该立即显示我的拇指没有按钮点击。以下是我在按钮点击中使用的代码。请任何人指导。
private void GetMinDataBtn_Click(object sender, EventArgs e)
{
SGFingerPrintManager manager = new SGFingerPrintManager();
int deviceInfo = manager.Init(SGFPMDeviceName.DEV_AUTO);
deviceInfo = manager.OpenDevice(0);
try
{
this.m_TestMin.Initialize();
SGFPMDeviceInfoParam pInfo = new SGFPMDeviceInfoParam();
deviceInfo = manager.GetDeviceInfo(pInfo);
byte[] buffer = new byte[pInfo.ImageWidth * pInfo.ImageHeight]; //Here sometime it fails to load image through device. And sometimes it continously works without an issue.
deviceInfo = manager.GetImageEx(buffer, 0x1388, (int)this.FDxPicBox.Handle, 50);
if (manager.CreateTemplate(buffer, this.m_TestMin) == 0)
{
this.FdxToFIRBtn.Enabled = true;
this.VerifyBtn.Enabled = true;
this.StatusBar.Text = "Get Minutiae Data Success";
deviceInfo = manager.CloseDevice();
}
}
catch (Exception ex)
{
deviceInfo = manager.CloseDevice();
MessageBox.Show(ex.ToString());
this.StatusBar.Text = "Thumb data failed to get";
}
}