Ejemplo n.º 1
0
        public static int InitControl()
        {
            if (Control == null)
            {
                return(1);
            }

            Control.FPEngineVersion = "9";
            Control.SensorIndex     = 0;

            try
            {
                Control.EndEngine();
            }
            catch { }

            int initResult = Control.InitEngine();

            if (initResult == 0)
            {
                FpcHandle = Control.CreateFPCacheDB();

                SensorCount = Control.SensorCount;
                SensorIndex = Control.SensorIndex;
                ImageWidth  = Control.ImageWidth;
                ImageHeight = Control.ImageHeight;
                SensorSN    = Control.SensorSN;

                MatchType   = 2;
                IsConnected = true;
            }

            return(initResult);
        }
Ejemplo n.º 2
0
        private void Clean()
        {
#if (DEBUG && DESACTIVAHUELLERO)
            FPTable.Clear();
            FPTable = null;
#else
            ZKFPEng.FreeFPCacheDB(FPCache);
            FPTable.Clear();
            FPTable = null;
            ZKFPEng.EndEngine();
#endif
        }
Ejemplo n.º 3
0
 //FUNCION PARA DETENER EL DISPOSITIVO
 private void finalizarDispositivo()
 {
     lectorHuellas.OnCapture -= lectorHuellas_OnCapture;
     lectorHuellas.CancelEnroll();
     lectorHuellas.EndEngine();
     txtMensajes.Clear();
     mostrarNotificacion("Se ha finalizado las funciones del lector de huellas dactilares.");
     imgHuellaCapturada.Image = null;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 停止指纹设备
 /// </summary>
 /// <param name="fingerPrinter">指纹设备(如:AxZKFPEngX1)</param>
 public static void StopFingerPrintDevice(AxZKFPEngX fingerPrinter) //停止指纹设备
 {
     try
     {
         fingerPrinter.EndEngine();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         throw;
     }
 }
Ejemplo n.º 5
0
        private void frmPantallaRegistroEmpleadosEmpresas_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (Program.iUsarLectorHuellas == 1)
            {
                Controls.Add(lectorHuellas);

                if (lectorHuellas.InitEngine() == 0)
                {
                    lectorHuellas.FPEngineVersion = "9";
                    lectorHuellas.EnrollCount     = 3;
                }

                lectorHuellas.CancelEnroll();
                lectorHuellas.EndEngine();
            }
        }
Ejemplo n.º 6
0
        private void frmIniciarSesion_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                if (Program.iUsarHuellasCajeros == 1)
                {
                    lectorHuellas.OnCapture -= lectorHuellas_OnCapture;
                    lectorHuellas.CancelEnroll();
                    lectorHuellas.EndEngine();
                }
            }

            catch (Exception ex)
            {
                catchMensaje = new VentanasMensajes.frmMensajeNuevoCatch();
                catchMensaje.lblMensaje.Text = ex.Message;
                catchMensaje.ShowDialog();
            }
        }
Ejemplo n.º 7
0
        private void frmPantallaEspereAlmuerzos_FormClosing(object sender, FormClosingEventArgs e)
        {
            try
            {
                if ((Program.iUsarLectorHuellas == 1) && (Program.iUsarLectorPantallaEspere == 1))
                {
                    lectorHuellas.OnCapture -= lectorHuellas_OnCapture;
                    lectorHuellas.CancelEnroll();
                    lectorHuellas.EndEngine();
                }
            }

            catch (Exception ex)
            {
                catchMensaje = new VentanasMensajes.frmMensajeNuevoCatch();
                catchMensaje.lblMensaje.Text = ex.Message;
                catchMensaje.ShowDialog();
            }
        }
Ejemplo n.º 8
0
        private void btnDesconectar_Click(object sender, EventArgs e)
        {
            botonPresionado("btnDesconectar");

            fp.OnImageReceived -= fp_OnImageReceived;
            fp.OnCapture       -= fp_OnCapture;
            fp.FreeFPCacheDB(fpcHandle);
            fp.EndEngine();

            foreach (var ctr in this.Controls)
            {
                if (ctr is Button)
                {
                    ((Button)ctr).Enabled = true;
                }
            }

            btnConectar.Enabled = true;
            //btnLimpiar_Click(null, null);
        }
Ejemplo n.º 9
0
 private void InitialAxZkfp()
 {
     try
     {
         ZkFprint.OnCapture += zkFprint_OnCapture;
         if (ZkFprint.InitEngine() == 0)
         {
             ZkFprint.FPEngineVersion = "10";
             ZkFprint.EnrollCount     = 3;
         }
         else
         {
             ZkFprint.EndEngine();
         }
     }
     catch (Exception e)
     {
         //device_status.Text = "device init error: " + e.Message;
     }
 }
Ejemplo n.º 10
0
 private void btnClose_Click(object sender, EventArgs e)
 {
     m_zkFprint.EndEngine();
     Application.Exit();
 }
Ejemplo n.º 11
0
 private void endFinger()
 {
     ZKFPEngX1.EndEngine();
 }
        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;
            }
        }