Пример #1
0
        /// <summary>
        /// StartIdentification
        /// </summary>
        /// <param name="lstFingerprint_Templates">list source fingerpint templates</param>
        /// <param name="IdentificationCompleted">callback function after IdentificationCompleted</param>
        public void StartIdentification(List <byte[]> lstFingerprint_Templates, Action <bool> IdentificationCompleted)
        {
            Debug.WriteLine("Programme is loading database, please wait ...");
            //
            _lstFingerprint_Templates = lstFingerprint_Templates;
            _identificationCompleted  = IdentificationCompleted;

            // clear ole instance
            if (_futronicIdentification != null)
            {
                // unregister events
                _futronicIdentification.OnPutOn   -= OnPutOn;
                _futronicIdentification.OnTakeOff -= OnTakeOff;
                //_futronicIdentification.UpdateScreenImage += new UpdateScreenImageHandler(this.UpdateScreenImage);
                _futronicIdentification.OnFakeSource -= OnFakeSource;
                _futronicIdentification.OnGetBaseTemplateComplete -= OnGetBaseTemplateComplete;

                // set null
                _futronicIdentification = null;
            }

            // create new instance
            _futronicIdentification = new FutronicIdentification();

            // Set control property
            _futronicIdentification.FakeDetection      = true;
            _futronicIdentification.FFDControl         = true;
            _futronicIdentification.FARN               = 200;
            _futronicIdentification.Version            = VersionCompatible.ftr_version_compatible;
            _futronicIdentification.FastMode           = true;
            _futronicIdentification.MinMinuitaeLevel   = 3;
            _futronicIdentification.MinOverlappedLevel = 3;

            // register events
            _futronicIdentification.OnPutOn   += OnPutOn;
            _futronicIdentification.OnTakeOff += OnTakeOff;
            //_futronicIdentification.UpdateScreenImage += new UpdateScreenImageHandler(this.UpdateScreenImage);
            _futronicIdentification.OnFakeSource += OnFakeSource;
            _futronicIdentification.OnGetBaseTemplateComplete += OnGetBaseTemplateComplete;

            // start identification process
            _futronicIdentification.GetBaseTemplate();
        }
Пример #2
0
        private void IdentityApp()
        {
            SetStatusText("El programa está cargando la base de datos, espere...");
            List <DbRecord> Users = DbRecord.ReadRecords(m_DatabaseDir);

            SetStatusText(String.Empty);
            if (Users.Count == 0)
            {
                MessageBox.Show("Usuarios no encontrados. Por favor, ejecute el proceso de inscripción primero.", "KallpaBox Security",
                                MessageBoxButton.OK, MessageBoxImage.Exclamation);
                return;
            }
            m_OperationObj = Users;
            FutronicSdkBase dummy = new FutronicIdentification();

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

            // Set control property
            m_Operation.FakeDetection = true;
            m_Operation.FFDControl    = true;
            m_Operation.FARN          = 116;
            m_Operation.Version       = (VersionCompatible)2;
            m_Operation.FastMode      = false;

            // 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);
            ((FutronicIdentification)m_Operation).OnGetBaseTemplateComplete +=
                new OnGetBaseTemplateCompleteHandler(this.OnGetBaseTemplateComplete);

            // start identification process
            ((FutronicIdentification)m_Operation).GetBaseTemplate();
        }