Beispiel #1
0
        private void dgvDatos_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                iIdRegistro = Convert.ToInt32(dgvDatos.CurrentRow.Cells["id_pos_empleado_cliente"].Value.ToString());

                iniciarDispositivo();

                //if (recuperarHuella(iIdRegistro) == false)
                //    return;

                txtDescripcion.Text  = dgvDatos.CurrentRow.Cells["nombre_empleado"].Value.ToString();
                btnVerificar.Visible = true;
                btnRemover.Visible   = true;
                btnGuardar.Visible   = true;

                lectorHuellas.CancelEnroll();
                lectorHuellas.EnrollCount = 3;
                lectorHuellas.BeginEnroll();
                mostrarNotificacion("Por favor dar muestra de huella digital.");
            }

            catch (Exception ex)
            {
                catchMensaje = new VentanasMensajes.frmMensajeNuevoCatch();
                catchMensaje.lblMensaje.Text = ex.Message;
                catchMensaje.ShowDialog();
            }
        }
Beispiel #2
0
 //FUNCION PARA CANCELAR EL REGISTRO
 private void cancelarRegistroHuella()
 {
     lectorHuellas.CancelEnroll();
     txtBase64_1.Clear();
     btnVerificar.Enabled      = false;
     imgHuellaCapturada.Image  = null;
     lectorHuellas.OnCapture  -= lectorHuellas_OnCapture;
     lectorHuellas.EnrollCount = 3;
     lectorHuellas.BeginEnroll();
 }
Beispiel #3
0
 private void btnRegister_Click(object sender, EventArgs e)
 {
     ZkFprint.CancelEnroll();
     ZkFprint.EnrollCount = 3;
     ZkFprint.BeginEnroll();
     ShowHintInfo("Please give fingerprint sample.");
 }
Beispiel #4
0
        public void Enroll()
        {
            // TODO: Cambiar exceptions
            if (!connected)
            {
                throw new Exception("No hay conexión con el huellero.");
            }

            if (enrolling)
            {
                throw new Exception("Ya se está realizando un enrolamiento");
            }

            enrolling = true;
            features  = 0;

#if (!DEBUG || !DESACTIVAHUELLERO)
            try
            {
                ZKFPEng.BeginEnroll();
            }
            catch
            {
                throw new Exception("No fue posible iniciar el modo de enrolamiento.");
            }
#endif
        }
Beispiel #5
0
 private void btnRegister_Click(object sender, EventArgs e)
 {
     ZkFprint.CancelEnroll();
     ZkFprint.EnrollCount = 3;
     ZkFprint.BeginEnroll();
     ShowHintInfo("POR FAVOR DE UN EJEMPLO DE SU HUELLA DIGITAL");
 }
 private void button2_Click(object sender, RoutedEventArgs e)
 {
     ZKFPEngX1.CancelEnroll();
     ZKFPEngX1.EnrollCount = 3;
     ZKFPEngX1.BeginEnroll();
     ShowHintInfo("Begin Register");
 }
Beispiel #7
0
        private void zkFprint_OnEnroll(object sender, IZKFPEngXEvents_OnEnrollEvent e)
        {
            if (e.actionResult)
            {
                string template = zk_dispositivo.EncodeTemplate1(e.aTemplate);
                txtBase64_1.Text = template;
                mostrarNotificacion("Registro satisfactorio, puede verificar su huella.");
                btnVerificar.Enabled = true;
            }

            else
            {
                zk_dispositivo.EnrollIndex += 1;
                mostrarNotificacion("Error, por favor, registre la huella nuevaente.");
                zk_dispositivo.CancelEnroll();
                zk_dispositivo.EnrollCount = 3;
                zk_dispositivo.BeginEnroll();
            }
        }
Beispiel #8
0
 /// <summary>
 /// 开始采集指纹 一共需要采集三次才能触发 OnEnroll事件
 /// </summary>
 /// <param name="fingerPrintDevice">指纹设备(如:AxZKFPEngX1)</param>
 public static void StartCapture(AxZKFPEngX fingerPrintDevice)
 {
     try
     {
         fingerPrintDevice.BeginEnroll();
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
         throw;
     }
 }
Beispiel #9
0
        private void FingerPrintForm_Load(object sender, EventArgs e)
        {
            FormManager.GetSingleton().SetCurrentFocusForm(this);
            m_zkFprint = FingerPrint.GetSingleton().GetFingerprint();

            FingerPrint.GetSingleton().SetupFingerprintEvent(Controls, zkFprint_OnFeatureInfo, zkFprint_OnImageReceived, zkFprint_OnEnroll, zkFprint_OnCapture);
            //Console.WriteLine();
            // m_zkFprint.BeginCapture();
            // m_zkFprint.CancelEnroll();
            m_zkFprint.EnrollCount = 3;
            m_zkFprint.BeginEnroll();
            ShowMessage("Please give fingerprint regiss.");
        }
Beispiel #10
0
 public static void BeginEnroll()
 {
     if (IsConnected)
     {
         if (Control.IsRegister)
         {
             Control.CancelEnroll();
         }
         Control.EnrollCount = 3;
         Control.BeginEnroll();
         Status = RobotStatus.enroll;
     }
 }
Beispiel #11
0
 private void btnRegister_Click(object sender, EventArgs e)
 {
     if (txtName.Text != "")
     {
         fpicture.Image            = null;
         ZkFprint.OnImageReceived += zkFprint_OnImageReceived;
         ZkFprint.OnFeatureInfo   += zkFprint_OnFeatureInfo;
         ZkFprint.OnEnroll        += zkFprint_OnEnroll;
         ZkFprint.CancelEnroll();
         ZkFprint.EnrollCount = 3;
         ZkFprint.BeginEnroll();
         ShowHintInfo("Please give fingerprint sample.");
     }
     else
     {
         MessageBox.Show("Enter Name First!");
     }
 }
        private void ScanFingerStdFrm_Load(object sender, EventArgs e)
        {
            // Init Database
            _db = ((TeachingViewFrm)Parent)._db;

            // Init FP engine
            _fpEngine = new AxZKFPEngX();
            _fpEngine.BeginInit();
            _fpEngine.OnEnroll += new IZKFPEngXEvents_OnEnrollEventHandler(_fpEngine_OnEnroll);
            _fpEngine.OnImageReceived += new IZKFPEngXEvents_OnImageReceivedEventHandler(_fpEngine_OnImageReceived);
            this.Controls.Add(_fpEngine);

            if (_fpEngine.InitEngine() != 0)
            {
                MessageBox.Show("ไม่สามารถติดต่อเครื่องสแกนลายนิ้วมือได้", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                if (AutoScanMode == false)
                {
                    this.Close();
                }
                else
                {
                    _fpEngine.EndInit();
                    _fpEngine.EndEngine();
                    StopAutoScan = true;
                    btnCancel.Enabled = false;
                }
            }

            _fpEngine.BeginEnroll();
            txtFPStatus.Text = "วางนิ้ว 3 ครั้ง";
            txtFPNo.Text = _cntFPEnroll.ToString();

            _timer.Enabled = false;
            _timer.Interval = 3000;
            _timer.Tick += new EventHandler(_timer_Tick);

            txtStdID.Text = StdID;
            txtStdName.Text = StdName;

            if (AutoScanMode == false)
            {
                btnStop.Visible = false;
                btnCancel.Visible = false;
            }
        }