Esempio n. 1
0
 public override void Do(object pData)
 {
     FaceDetect detector = (FaceDetect)pData;
     detector.SwitchTicketCam(true);
     
     bool bCmp = false;
     string strQrCode="";
     for (int i=0; i<detector.GetMaxTicketChkTimes(); i++)
     {
         bCmp = detector.DoCheckTicket(ref strQrCode);
         if (bCmp) { break; }
         JobManager.Sleep(JobManager.IDLE_WAIT_MS * 2);
     }
     detector.SwitchTicketCam(false);
     
     if (bCmp)
     {
         string str = string.Format("二维码内容: {0}", strQrCode);
         detector.PromptInfo(str);
         JobManager.Sleep(200); //! for demo only
         GetMgr().disPatch(JobManager.sHandlerOpenGate, pData);
     }
     else {
         detector.PromptError("车票验证不通过!\n请走人工验票通道。");
         detector.PlayVoice(ConstValue.VOICE_FAIL_TICKCHK, true);
         GetMgr().disPatch(JobManager.sHandlerException, pData);
     }
 }
Esempio n. 2
0
        // 验证通过,允许通行
        public override void Do(object pData)
        {
            FaceDetect detector = (FaceDetect)pData;

            detector.LetGo();
            JobManager.Sleep(800); //! for demo only
            GetMgr().disPatch(JobManager.sHandlerReadIDCard, pData);
        }
Esempio n. 3
0
        public override void Do(object pData)
        {
            FaceDetect detector = (FaceDetect)pData;

            if (detector.ReadIDCardInfo())
            {
                GetMgr().disPatch(JobManager.sHandlerFaceCmp, pData);
            }
            else
            {
                JobManager.Sleep(JobManager.IDLE_WAIT_MS);
            }
        }
Esempio n. 4
0
        public override void Do(object pData)
        {
            FaceDetect detector = (FaceDetect)pData;

            detector.SwitchLight(2, true);
            detector.SwitchLight(3, true);
            detector.PlayVoice(ConstValue.VOICE_VIEW_CAM);

            float fScore = 0.0f;
            bool  bCmp   = false;

            for (int i = 0; i < detector.GetMaxFaceCmpTimes(); i++)
            {
                bCmp = detector.DoFaceCmp(ref fScore);
                if (bCmp)
                {
                    break;
                }
                JobManager.Sleep(JobManager.IDLE_WAIT_MS);
            }

            detector.SwitchLight(2, false);
            detector.SwitchLight(3, false);
            detector.KeepCompareInfo(fScore);

            if (bCmp)
            {
                detector.PromptInfo("人脸识别通过");
                JobManager.Sleep(100); //for test
                GetMgr().disPatch(JobManager.sHandlerTicketCheck, pData);
            }
            else
            {
                detector.PromptError("人脸识别不通过");
                detector.PlayVoice(ConstValue.VOICE_FAIL_FACECMP);
                GetMgr().disPatch(JobManager.sHandlerException, pData);
            }

            detector.WriteFaceCmpLog(fScore);
        }
Esempio n. 5
0
 public override void Do(object pData)
 {
     JobManager.Sleep((int)(3.5 * 1000)); //3.5s
     GetMgr().disPatch(JobManager.sHandlerReadIDCard, pData);
 }
Esempio n. 6
0
 public override void Do(object pData)
 {
     WinCall.TraceMessage("***EmptyHandler for test.");
     JobManager.Sleep(3000);
     GetMgr().disPatch(JobManager.sHandlerReadIDCard, pData);
 }