private void FrmAttendance_Load(object sender, EventArgs e)
        {
            try
            {
                activeSemester = _semesterRepo.GetActiveSessionSemester();
                if (activeSemester == null)
                {
                    MessageBox.Show("You cannot mark attendance because there is no active semester", "Denied", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                lblSession.Text = activeSemester.Session + " - " + activeSemester.Semester;
                Cursor          = Cursors.WaitCursor;
                // set culture
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB", false);

                Capturer = new DPFP.Capture.Capture();               // Create a capture operation.
                try
                {
                    if ((Capturer != null))
                    {
                        Capturer.StartCapture();
                        Capturer.EventHandler = this;
                    }
                    // Subscribe for capturing events.
                    else
                    {
                        throw new Exception("Can't initiate capture operation! Please exit and relaunch the application");
                    }
                }
                catch (Exception ex)
                {
                    logger.WriteLog(ex);
                    MessageBox.Show("Can't initiate capture operation! Please exit and relaunch the application", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

                Enroller    = new DPFP.Processing.Enrollment();
                Verificator = new DPFP.Verification.Verification();
                Application.DoEvents();

                Capturer.StartCapture();
                SetPrompt("Using the fingerprint reader, scan your fingerprint.");
            }
            catch (Exception ex)
            {
                logger.WriteLog(ex);
                //MsgBox(ex.Message, MsgBoxStyle.Exclamation, Application.ProductName);
            }
            finally
            {
                Cursor = Cursors.Default;
            }

            getTodayAttendance();
        }
Exemple #2
0
        public void Start()
        {
            if (null != Capturer)
            {
                try
                {
                    Capturer.StartCapture();
                    string json = @"data =
                    {
                        'type': '" + "Capture reader" + @"',
                        'payload': [
                            {
                                'state' : '" + "Inicialite" + @"'
                            }
                        ] 
                    }
                ";

                    foreach (WebSocketSession session in appServer.GetAllSessions())
                    {
                        session.Send(json);
                    }
                }
                catch
                {
                }
            }
        }
Exemple #3
0
 public void Start()
 {
     if (null != Capturer)
     {
         try
         {
             Capturer.StartCapture();
         }
         catch
         {
         }
     }
 }
Exemple #4
0
 public void InitCapture()
 {
     if (capture != null)
     {
         try
         {
             capture.StartCapture();
         }catch (Exception e)
         {
             MessageBox.Show("ERROR AL INICIAR LA CAPTURA CON DIGITAL-PERSONA");
         }
     }
 }
 protected void IniciarCaptura()
 {
     if (Captura != null)
     {
         try
         {
             Captura.StartCapture();
         }
         catch (Exception ex)
         {
             System.Windows.Forms.MessageBox.Show("No se pudo Inicializar la Captura de huella");
         }
     }
 }
Exemple #6
0
        //public void OnTemplate(DPFP.Template template)
        //{
        //    this.Invoke((Action)(delegate ()
        //    {
        //        Template = template;
        //        if (Template == null)
        //            MessageBox.Show("The fingerprint template is not valid. Repeat fingerprint enrollment!");
        //    }));
        //}

        protected void Start()
        {
            if (null != Capturer)
            {
                try
                {
                    Capturer.StartCapture();
                }
                catch
                {
                    MessageBox.Show("Can't initiate capture");
                }
            }
        }
 protected virtual void Start()
 {
     if (null != Capturer)
     {
         try
         {
             Capturer.StartCapture();
             SetPrompt("Using fingerprint reader scan your fingerprint.");
         }
         catch
         {
             SetPrompt("Cant initiate capture!");
         }
     }
 }
Exemple #8
0
 protected void Start()
 {
     if (null != Capturer)
     {
         try
         {
             Capturer.StartCapture();
             //setpropt
         }
         catch
         {
             //erorr
         }
     }
 }
Exemple #9
0
 protected void Start()
 {
     if (null != Capturer)
     {
         try
         {
             Capturer.StartCapture();
             SetPrompt("escanea tu huella.");
         }
         catch
         {
             SetPrompt("no se pudo inicializar la captura");
         }
     }
 }
 protected void Start()
 {
     if (null != Capturer)
     {
         try
         {
             Capturer.StartCapture();
             //SetPrompt("Escanea tu huella usando el lector");
         }
         catch
         {
             //SetPrompt("No se puede iniciar la captura");
         }
     }
 }
Exemple #11
0
 private void Start()
 {
     if (Capturer != null)
     {
         try
         {
             Capturer.StartCapture();
             Dejitaru.SetControlProperty(this, lstatus, "Text", "Place finger on the scanner to start.");
         }
         catch
         {
             Dejitaru.SetControlProperty(this, lstatus, "Text", "Can't start capture.");
         }
     }
 }
Exemple #12
0
 private void frmVerficarDedo_Load(object sender, EventArgs e)
 {
     try
     {
         Capturer = new DPFP.Capture.Capture();
         CNUsuario Uh = new CNUsuario();
         Uh.IDUsuario = IDUsuario;
         Template     = Uh.RegresarHuellaTemp();
         Init();
         Capturer.StartCapture();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Ocurrio un error:" + ex.ToString(), "Error inesperado", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (ControlAtraso.Helper.AccesoInternet())
            {
                try
                {
                    System.Windows.Threading.DispatcherTimer dispathcer = new System.Windows.Threading.DispatcherTimer();

                    dispathcer.Interval = new TimeSpan(0, 0, 1);

                    dispathcer.Tick += (x, y) =>
                    {
                        this.Now.Text = string.Format("{0} {1}", DateTime.Today.ToString("D", new System.Globalization.CultureInfo("es-ES")), DateTime.Now.ToLongTimeString());
                    };

                    dispathcer.Start();

                    Capturer = new DPFP.Capture.Capture();

                    if (Capturer != null)
                    {
                        Capturer.EventHandler = this;

                        Capturer.StartCapture();
                    }

                    ControlAtraso.UI.MainWindow.Valid = true;
                }
                catch
                {
                    ControlAtraso.UI.MainWindow.Valid = false;

                    MessageBox.Show("Primero instale el driver del lector de huella", "Insignia", MessageBoxButton.OK, MessageBoxImage.Exclamation);

                    this.Close();
                }
            }
            else
            {
                ControlAtraso.UI.MainWindow.Valid = false;

                MessageBox.Show("Por favor compruebe su conexión a Internet\n(no se puede establer conexión con el servidor Insignia)", "Insignia", MessageBoxButton.OK, MessageBoxImage.Error);

                this.Close();
            }
        }
Exemple #14
0
        private void frmRegistroDiario_Load(object sender, EventArgs e)
        {
            try
            {
                Capturer = new DPFP.Capture.Capture();

                obtenerHuellas();
                MostrarLista();
                if (null != Capturer)
                {
                    Capturer.EventHandler = this;
                }

                Capturer.StartCapture();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.ToString(), "Error Inesperado", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #15
0
        private void frmVeriTodasHuellas_Load(object sender, EventArgs e)
        {
            try
            {
                Capturer = new DPFP.Capture.Capture();
                CNUsuario Uh = new CNUsuario();
                // Uh.IDUsuario = IDUsuario;
                ObtenerHuellas();
                // Init();
                if (null != Capturer)
                {
                    Capturer.EventHandler = this;
                }

                Capturer.StartCapture();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Ocurrio un error:" + ex.ToString(), "Error inesperado", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #16
0
 private void detects_btn_Click(object sender, EventArgs e)
 {
     Capturer.StartCapture();
 }