zkemKeeper无法在c#桌面应用程序中触发事件

zkemKeeper无法在c#桌面应用程序中触发事件,c#,fingerprint,zkemkeeper,C#,Fingerprint,Zkemkeeper,我已将设备与计算机连接,并且能够从设备检索用户ID,但无法触发事件 这是在c#桌面应用程序中,当我在机器上按手指时,桌面应用程序没有响应 我会感谢你对解决问题的支持,我错过了一件小事 namespace RangIdent { public partial class Form1 : Form { public Form1() { InitializeComponent(); } 已连接的专用void\u单击(对象发送方,事件参数e)

我已将设备与计算机连接,并且能够从设备检索用户ID,但无法触发事件

这是在c#桌面应用程序中,当我在机器上按手指时,桌面应用程序没有响应

我会感谢你对解决问题的支持,我错过了一件小事

 namespace RangIdent
{
 public partial class Form1 : Form
  {
            public Form1()
    {

        InitializeComponent();
}
已连接的专用void\u单击(对象发送方,事件参数e) { zkemceeper.CZKEM bio=新的zkemceeper.CZKEM()


我希望在验证或启动onfinger事件时可以正常运行

对不起,伙计们,我刚刚找到了解决方案。我已经将axCZKEM ocx添加到工具箱中,它工作正常。对不起,伙计们,我刚刚找到了解决方案。我已经将axCZKEM ocx添加到工具箱中,它工作正常
        bool van;
        // van = bio.Connect_USB(1);
        bio.SetCommPassword(10);
        van = bio.Connect_Com(4, 1, 115200);
                   bio.Beep(150);
        if (van == true)
        {
            bio.EnableDevice(1, true);

            bio.OnFinger -= new 
  zkemkeeper._IZKEMEvents_OnFingerEventHandler(bio_OnFinger);
            bio.OnVerify -= new 
  zkemkeeper._IZKEMEvents_OnVerifyEventHandler(bio_OnVerify);
            bio.OnAttTransactionEx -= new zkemkeeper._IZKEMEvents_OnAttTransactionExEventHandler(bio_OnAttTransactionEx 
  );
            bio.OnFingerFeature -= new 

zkemkeeper._IZKEMEvents_OnFingerFeatureEventHandler(bio_OnFingerFeature);
            bio.OnEnrollFingerEx -= new zkemkeeper._IZKEMEvents_OnEnrollFingerExEventHandler(bio_OnEnrollFingerEx);

            var iMachineNumber = 1;
            if (bio.RegEvent(iMachineNumber, 65535))/
            {
                bio.OnVerify += new 
 zkemkeeper._IZKEMEvents_OnVerifyEventHandler(bio_OnVerify);
                bio.OnFinger += new 
  zkemkeeper._IZKEMEvents_OnFingerEventHandler(bio_OnFinger);

                bio.OnAttTransactionEx += new zkemkeeper._IZKEMEvents_OnAttTransactionExEventHandler(bio_OnAttTransactionEx 
  );
                bio.OnFingerFeature += new zkemkeeper._IZKEMEvents_OnFingerFeatureEventHandler(bio_OnFingerFeature);
                bio.OnEnrollFingerEx += new zkemkeeper._IZKEMEvents_OnEnrollFingerExEventHandler(bio_OnEnrollFingerEx);

                string sdwEnrollNumber = "";
                string sdwName = "";
                string sdwPassword = "";

                int idwYear = 0;

                Boolean bol = false;

                Cursor = Cursors.WaitCursor;
                bio.EnableDevice(1, false);
                if (bio.ReadAllUserID(1))//.ReadGeneralLogData(1))
                { 

       SQLiteCommand(m_dbConnection))

                    while (bio.SSR_GetAllUserInfo(1, out sdwEnrollNumber, 
  out sdwName,
                            out sdwPassword, out idwYear, out bol))
                    { 


                        try
                        {

                        }
                        catch (Exception ex)
                        {

                        }
                        try
                        {

                            Debug.WriteLine("inserted: ID " + 
 sdwEnrollNumber + " Name" + sdwName + " Password" + sdwPassword);
                        }
                        catch (Exception ex)
                        {
                            Debug.WriteLine(ex.ToString() + " " + 
  ex.StackTrace);
                        }
                    }
                    // transaction.Commit();
                }
            }

            Debug.WriteLine("Connection Closed");
            Cursor = Cursors.Default;

            Cursor = Cursors.Default;

            bio.EnableDevice(1, true); //enable the device
            Cursor = Cursors.Default;


            MessageBox.Show("Connected");
        }
        else
        {
            MessageBox.Show("device not found");
        }
    }

    private void bio_OnEnrollFingerEx(string EnrollNumber, int 
 FingerIndex, int ActionResult, int TemplateLength)
    {
        MessageBox.Show("bio_OnEnrollFingerEx");
    }

    private void bio_OnFingerFeature(int Score)
    {
        MessageBox.Show("bio_OnFingerFeature");
    }

    private void bio_OnAttTransactionEx(string EnrollNumber, int 
IsInValid, int AttState, int VerifyMethod, int Year, int Month, int Day, 
int Hour, int Minute, int Second, int WorkCode)
    {
        MessageBox.Show("bio_OnAttTransactionEx");
    }

    private void bio_OnVerify(int UserID)
    {
        Debug.WriteLine("OnVerify");
        MessageBox.Show("bio_OnVerify =" + UserID);
    }

    private void bio_OnFinger()
    {
         Debug.WriteLine("OnFinger");
        MessageBox.Show("bio_OnFinger");
    }

    private void RegEve_Click(object sender, EventArgs e)
    {

    }
 }
}