예제 #1
0
 /// <summary>
 /// 向指定高速缓冲区中添加指纹模板
 /// </summary>
 /// <param name="strFingerPrint">指纹字符串</param>
 /// <param name="fingerPrintDevice">指纹设备</param>
 /// <param name="fpcHandle">高速缓冲存储区的号码</param>
 /// <param name="fingerPrintId">验证成功时将返回的ID 作为指纹的唯一标识</param>
 /// <returns></returns>
 public static bool AddFingerprintTemplate(string strFingerPrint, AxZKFPEngX fingerPrintDevice, int fpcHandle,
                                           int fingerPrintId)
 {
     if (String.IsNullOrWhiteSpace(strFingerPrint))
     {
         return(false);
     }
     MessageBox.Show(strFingerPrint);
     try
     {
         var fRegTemplete = fingerPrintDevice.DecodeTemplate1(strFingerPrint);
         fingerPrintDevice.AddRegTemplateToFPCacheDB(fpcHandle, fingerPrintId, fRegTemplete);
         return(true);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         return(false);
     }
 }