private void axZKFPEngX1_OnEnroll(object sender, AxZKFPEngXControl.IZKFPEngXEvents_OnEnrollEvent e) { VisitorFrm regForm = new VisitorFrm(); regForm.OnFormClose += refreshData; regForm.ShowDialog(this); }
private void axZKFPEngX1_OnCapture(object sender, AxZKFPEngXControl.IZKFPEngXEvents_OnCaptureEvent e) { if (e.actionResult == true) { int[] matchInfo = e.aTemplate as int[]; if (matchInfo[0] >= 0) { Visitor v = _visitList[matchInfo[0]]; VisitLog log = _logService.GetTodayLogNotLeaveOfVisitor(v.Id); if (log == null) { // 添加访问记录 VisitorFrm regForm = new VisitorFrm(v); regForm.OnFormClose += refreshData; regForm.ShowDialog(this); } else { // 添加离开记录 leaveVisitor(log); } } else { if (MessageBox.Show("您好,未找到匹配的访客信息,您要登记新访客吗?", "提示", MessageBoxButtons.YesNo) == DialogResult.Yes) { switchToRegister(); } } } else { MessageBox.Show("您好,没有获取到完整的指纹信息,请重新录入指纹!", "提示"); } }