Esempio n. 1
0
    protected void btnFPUserIdentify_Click(object sender, EventArgs e)
    {
        GetXParam();
        int    intIndex      = this.cboProductType.SelectedIndex + 1;
        string strDeviceType = _IniFile.IniReadValue(TRUSTLINK_INI_DEVICE_TYPE, TRUSTLINK_INI_SET_DEVICE_TYPE + intIndex.ToString());
        string strOcxClassID = _IniFile.IniReadValue(TRUSTLINK_INI_DEVICE_TYPE, TRUSTLINK_INI_VERIFY + intIndex.ToString());
        string strOcxName    = _IniFile.IniReadValue(TRUSTLINK_INI_DEVICE_TYPE, TRUSTLINK_INI_OCXNAME + intIndex.ToString());

        _TG.DeviceType = strDeviceType;
        _TG.OcxClassID = strOcxClassID;
        _TG.OcxName    = strOcxName;

        if (_TG.FPUserIdentify() != SUCCESSED)
        {
            ErrMsgDlg(_TG);
        }
    }
Esempio n. 2
0
    public int FpIdentityUser()
    {
        //if (DateTime.Now.Subtract(lastIdentity).TotalMilliseconds < 200) {
        //     Thread.Sleep(200);
        // }
        // lastIdentity = DateTime.Now;
        _TG.OcxClassID = VERIFY_CLSID;
        int result = _TG.FPUserIdentify();

        //int retryTimes=0;
        //while (result != SUCCESSED && retryTimes++ < 5) {
        //    Thread.Sleep(500);
        //    result = _TG.FPUserIdentify();
        //}
        if (result != SUCCESSED && this.blDefaultAlert)
        {
            ErrMsgDlg();
        }
        return(result);
    }