Example #1
0
        /// <summary>
        /// Called on each finger to begin Enrollment process for that finger
        /// </summary>
        private void StartEnrollment()
        {
            if (_currentOperation != null)
            {
                _currentOperation.Dispose();
                _currentOperation = null;
            }

            _currentOperation = new FutronicEnrollment
            {
                FFDControl = true,
                FARN       = 166,
                Version    = VersionCompatible.ftr_version_current
            };

            // Set properties
            ((FutronicEnrollment)_currentOperation).MaxModels = 3;
            _currentOperation.MinMinuitaeLevel   = 2;
            _currentOperation.MinOverlappedLevel = 4;

            // register events
            _currentOperation.OnPutOn           += OnPutOn;
            _currentOperation.OnTakeOff         += OnTakeOff;
            _currentOperation.UpdateScreenImage += UpdateScreenImage;
            ((FutronicEnrollment)_currentOperation).OnEnrollmentComplete += OnEnrollmentComplete;

            //start enrollment process
            ((FutronicEnrollment)_currentOperation).Enrollment();
        }
Example #2
0
        private void Page_Unloaded(object sender, RoutedEventArgs e)
        {
            m_bExit = true;
            if (m_Operation != null)
            {
                //// unregister events
                m_Operation.OnPutOn           -= new OnPutOnHandler(this.OnPutOn);
                m_Operation.OnTakeOff         -= new OnTakeOffHandler(this.OnTakeOff);
                m_Operation.UpdateScreenImage -= new UpdateScreenImageHandler(this.UpdateScreenImage);
                m_Operation.OnFakeSource      -= new OnFakeSourceHandler(this.OnFakeSource);
                ((FutronicIdentification)m_Operation).OnGetBaseTemplateComplete -=
                    new OnGetBaseTemplateCompleteHandler(this.OnGetBaseTemplateComplete);

                m_OperationObj = null;
                m_Operation.Dispose();
            }
        }
Example #3
0
#pragma warning restore CS0414 // El campo 'FingerPrintsCreate.m_bInitializationSuccess' está asignado pero su valor nunca se usa

        private void InsertFingerPrintClient_Click(object sender, RoutedEventArgs e)
        {
            DbRecord User = new DbRecord();

            if (string.IsNullOrEmpty(Identificacion.Text))
            {
                MessageBox.Show("Debe ingresar un nombre de usuario.", "KallpaBox Security",
                                MessageBoxButton.OK, MessageBoxImage.Exclamation);
                return;
            }
            // Try creat the file for user's information
            if (IsUserExists(Identificacion.Text))
            {
                MessageBoxResult nResponse;
                nResponse = MessageBox.Show("El usuario ya existe. ¿Quieres reemplazarlo?",
                                            "KallpaBox Security.",
                                            MessageBoxButton.YesNo, MessageBoxImage.Question);
                if (nResponse == MessageBoxResult.No)
                {
                    return;
                }
            }
            else
            {
                try
                {
                    CreateFile(Identificacion.Text);
                }
                catch (DirectoryNotFoundException)
                {
                    MessageBox.Show("No se puede crear un archivo para guardar la información de un usuario.", "KallpaBox Security",
                                    MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
                catch (IOException)
                {
                    MessageBox.Show(string.Format("Nombre de usuario incorrecto '{0}'.", Identificacion.Text), "KallpaBox Security"
                                    , MessageBoxButton.OK, MessageBoxImage.Exclamation);
                    return;
                }
            }

            User.UserName = Identificacion.Text;

            m_OperationObj = User;
            FutronicSdkBase dummy = new FutronicEnrollment();

            if (m_Operation != null)
            {
                m_Operation.Dispose();
                m_Operation = null;
            }
            m_Operation = dummy;

            // Set control properties
            m_Operation.FakeDetection = true;
            m_Operation.FFDControl    = true;
            m_Operation.FARN          = 116;
            m_Operation.Version       = (VersionCompatible)2;
            m_Operation.FastMode      = false;
            ((FutronicEnrollment)m_Operation).MIOTControlOff = true;
            ((FutronicEnrollment)m_Operation).MaxModels      = 3;

            // register events
            m_Operation.OnPutOn           += new OnPutOnHandler(this.OnPutOn);
            m_Operation.OnTakeOff         += new OnTakeOffHandler(this.OnTakeOff);
            m_Operation.UpdateScreenImage += new UpdateScreenImageHandler(this.UpdateScreenImage);
            m_Operation.OnFakeSource      += new OnFakeSourceHandler(this.OnFakeSource);
            ((FutronicEnrollment)m_Operation).OnEnrollmentComplete += new OnEnrollmentCompleteHandler(this.OnEnrollmentComplete);

            // start enrollment process
            ((FutronicEnrollment)m_Operation).Enrollment();
        }
Example #4
0
        public void Enroll(string name, int max_models = 2)
        {
            DbRecord _user = new DbRecord();

            if (name == null)
            {
                //_logger.LogWarning("Error se esperaba el paramentro nombre");
                return;
            }

            if (name.Length == 0)
            {
                //_logger.LogWarning("Error el paranombre deberia tener caracteres");
                return;
            }

            if (IsUserExists(name))
            {
                //_logger.LogInformation("El usuario existe en la base de datos");
            }
            else
            {
                try
                {
                    CreateFile(name);
                }
                catch (DirectoryNotFoundException dnfException)
                {
                    //_logger.LogWarning(string.Format("Error el directorio no existe, {0}", dnfException));

                    return;
                }
                catch (IOException ioException)
                {
                    //_logger.LogWarning(string.Format("Error de lectura y escritura, {0}",ioException));
                    return;
                }
            }

            _user.UserName = name;
            m_OperationObj = _user;
            FutronicSdkBase dummy = new FutronicEnrollment();

            if (m_Operation != null)
            {
                m_Operation.Dispose();
                m_Operation = null;
            }
            m_Operation = dummy;

            // Set control properties
            m_Operation.FakeDetection = true;
            m_Operation.FFDControl    = true;
            m_Operation.FARN          = 2;
            m_Operation.Version       = VersionCompatible.ftr_version_current;
            m_Operation.FastMode      = true;
            ((FutronicEnrollment)m_Operation).MIOTControlOff = false;
            ((FutronicEnrollment)m_Operation).MaxModels      = max_models;


            // register events
            m_Operation.OnPutOn   += new OnPutOnHandler(this.OnPutOn);
            m_Operation.OnTakeOff += new OnTakeOffHandler(this.OnTakeOff);
            //m_Operation.UpdateScreenImage += new UpdateScreenImageHandler(this.UpdateScreenImage);
            m_Operation.OnFakeSource += new OnFakeSourceHandler(this.OnFakeSource);
            ((FutronicEnrollment)m_Operation).OnEnrollmentComplete += new OnEnrollmentCompleteHandler(this.OnEnrollmentComplete);

            // start enrollment process
            ((FutronicEnrollment)m_Operation).Enrollment();
        }