Esempio n. 1
0
        void ZKFPEng_OnEnroll(object sender, IZKFPEngXEvents_OnEnrollEvent e)
        {
            bool   ret          = e.actionResult;
            string userTemplate = "";

            enrolling = false;
            if (ret)
            {
                userTemplate = ZKFPEng.GetTemplateAsStringEx("10");
                int score = 0, processedFPNumber = 0;
                if (ZKFPEng.IsOneToOneTemplateStr(userTemplate) || (ZKFPEng.IdentificationInFPCacheDB(FPCache, e.aTemplate, ref score, ref processedFPNumber) != -1 && FPTable.ContainsKey(processedFPNumber)))
                {
                    userTemplate = string.Empty;
                    ret          = false;
                }
            }
            OnEnrolled(new EnrolledEventArgs(ret, userTemplate));
        }
Esempio n. 2
0
        /// <summary>
        /// 用于处理OnCapture事件,将采集到的指纹模板和高速缓冲区比对
        /// </summary>
        /// <param name="fingerPrintDevice">指纹设备(如:AxZKFPEngX1)</param>
        /// <param name="fpcHandle">高速缓冲区域的ID</param>
        /// <param name="e">IZKFPEngXEvents_OnCaptureEvent事件 一般为e</param>
        /// <param name="similarity">相似度 【引用传值!】</param>
        /// <param name="identificationIndex">认证顺序号码【引用传值!】</param>
        /// <returns>最相似模板的 ID</returns>
        public static int VeryfyAFingerPrint(AxZKFPEngX fingerPrintDevice, int fpcHandle, IZKFPEngXEvents_OnCaptureEvent e, ref int similarity, ref int identificationIndex)
        {
            int resault;

            try
            {
                resault = fingerPrintDevice.IdentificationInFPCacheDB(fpcHandle, e.aTemplate, ref similarity, ref identificationIndex);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                throw;
            }
            return(resault);
        }