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();
        }
Ejemplo n.º 2
0
 public AdminForm(string admin_name, StartForm parent)
 {
     this.parent = parent;
     InitializeComponent();
     this.adminname = admin_name;
     host_text      = parent.host_text;
     port_text      = parent.port_text;
     db_user_text   = parent.db_user_text;
     db_pass_text   = parent.db_pass_text;
     db_name_text   = parent.db_name_text;
     load_table();
     Capturer = new DPFP.Capture.Capture();
     Capturer.EventHandler = this;
 }
Ejemplo n.º 3
0
        protected virtual void Init()
        {
            try
            {
                Capturer = new DPFP.Capture.Capture();

                if (null != Capturer)
                    Capturer.EventHandler = this;
            }
            catch
            {
                MessageBox.Show("Can't initiate capture operation!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 4
0
 protected virtual void Init()
 {
     try
     {
         Capturer    = new DPFP.Capture.Capture();
         Verificator = new DPFP.Verification.Verification();
         if (null != Capturer)
         {
             Capturer.EventHandler = this;
         }
     }
     catch
     {
         MessageBox.Show("Can't initiate capture");
     }
 }
Ejemplo n.º 5
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);
     }
 }
Ejemplo n.º 6
0
        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();
            }
        }
Ejemplo n.º 7
0
        protected virtual void Init()
        {
            try
            {
                Enroller = new DPFP.Processing.Enrollment();            // Create an enrollment.
                Capturer = new DPFP.Capture.Capture(Priority.Low);      // Create a capture operation.

                UpdateStatus();
                if (null != Capturer)
                {
                    Capturer.EventHandler = this;                   // Subscribe for capturing events.
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 8
0
        protected virtual void Init()
        {
            try
            {
                Capturer = new DPFP.Capture.Capture();
                Enroller = new DPFP.Processing.Enrollment();
                this.TotalFeaturesNeeded = Enroller.FeaturesNeeded;

                if (null != Capturer)
                {
                    Capturer.EventHandler = this;
                }
            }
            catch
            {
                MessageBox.Show("Can't initiate capture");
            }
        }
Ejemplo n.º 9
0
        private void Init()
        {
            try
            {
                Capturer = new DPFP.Capture.Capture();
                Enroller = new DPFP.Processing.Enrollment();
                if (null != Capturer)
                {
                    Capturer.EventHandler = this;
                }

                // Un procedimiento
            }
            catch
            {
                MessageBox.Show("No se puede iniciar la operacion de caputra");
            }
        }
Ejemplo n.º 10
0
 protected virtual void Init()
 {
     try
     {
         Capturer = new DPFP.Capture.Capture();
         if (null != Capturer)
         {
             Capturer.EventHandler = this;
         }
         else
         {
             SetPrompt("Cant initiate capture operation!!");
         }
     }
     catch
     {
         MessageBox.Show("Error!!");
     }
 }
Ejemplo n.º 11
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);
            }
        }
Ejemplo n.º 12
0
        protected virtual void Init()
        {
            try
            {
                Capturer = new DPFP.Capture.Capture();                          // Create a capture operation.

                if (null != Capturer)
                {
                    Capturer.EventHandler = this;                                       // Subscribe for capturing events.
                }
                else
                {
                    SetPrompt("Can't initiate capture operation!");
                }
            }
            catch
            {
                MessageBox.Show("Can't initiate capture operation!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 13
0
        //public Template Template { get; private set; }

        protected virtual void Init()
        {
            try
            {
                Capturer = new DPFP.Capture.Capture();                          // Create a capture operation.

                if (null != Capturer)
                {
                    Capturer.EventHandler = this;                                       // Subscribe for capturing events.
                }
                else
                {
                    SetStatus("No se pudo iniciar la operación de captura");
                }
            }
            catch
            {
                MessageBox.Show("No se pudo iniciar la operación de captura", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 14
0
        protected void Init()
        {
            try
            {
                Capturer = new DPFP.Capture.Capture();                          // Create a capture operation.

                if (null != Capturer)
                {
                    Capturer.EventHandler = handler;                                    // Subscribe for capturing events.
                }
                else
                {
                    SetPrompt("Can't initiate capture operation!");
                }
            }
            catch
            {
                Console.WriteLine("Can't initiate capture operation! Error");
            }
        }
Ejemplo n.º 15
0
 private void Init()
 {
     Enroller = new DPFP.Processing.Enrollment();
     try
     {
         Capturer = new DPFP.Capture.Capture();
         if (null != Capturer)
         {
             Capturer.EventHandler = this;
         }
         else
         {
             Dejitaru.SetControlProperty(this, lstatus, "Text", "Can't initiate capture operation.");
         }
     }
     catch
     {
         Dejitaru.SetControlProperty(this, lstatus, "Text", "Can't initiate capture operation.");
     }
 }
Ejemplo n.º 16
0
        public void Init()
        {
            try
            {
                capture = new DPFP.Capture.Capture();

                if (capture != null)
                {
                    capture.EventHandler = this;
                    enrollment           = new DPFP.Processing.Enrollment();
                }
                else
                {
                    MessageBox.Show("ERROR AL INICIAR DIGITAL-PERSONA");
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("ERROR AL INICIAR DIGITAL-PERSONA");
            }
        }
Ejemplo n.º 17
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);
            }
        }
Ejemplo n.º 18
0
        protected virtual void Init()
        {
            try
            {
                Captura     = new Capture();
                verificador = new DPFP.Verification.Verification();
                template    = new Template();

                if (Captura != null)
                {
                    Captura.EventHandler = this;
                }
                else
                {
                    System.Windows.Forms.MessageBox.Show("No se pudo");
                }
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show("No se pudo Inicializar el lector de huella");
            }
        }
Ejemplo n.º 19
0
        public void Init()
        {
            try
            {
                capture = new DPFP.Capture.Capture();

                if (capture != null)
                {
                    capture.EventHandler = this;
                    template             = new DPFP.Template();
                    verification         = new DPFP.Verification.Verification();
                }
                else
                {
                    MessageBox.Show("ERROR AL INICIAR DIGITAL-PERSONA");
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("ERROR AL INICIAR DIGITAL-PERSONA");
                Debug.Write(e);
            }
        }
Ejemplo n.º 20
0
 protected virtual void Init()
 {
     try
     {
         Captura = new Capture();
         if (Captura != null)
         {
             Captura.EventHandler = this;
             Enroller             = new DPFP.Processing.Enrollment();
             StringBuilder text = new StringBuilder();
             text.AppendFormat("Necesitas pasar el dedo {0} veces", Enroller.FeaturesNeeded);
             vecesdedo.Content = text.ToString();
         }
         else
         {
             System.Windows.Forms.MessageBox.Show("No se pudo");
         }
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show("No se pudo Inicializar el lector de huella");
     }
 }