Exemplo n.º 1
0
        private void OnVerificationComplete(bool bSuccess, int nRetCode, bool bVerificationSuccess)
        {
            FingerprintMonitor fingerprintMonitor = FingerprintMonitor.Instance;

            // if fingerprinter is connected
            if (bSuccess)
            {
                // if true: Verification is successful
                if (bVerificationSuccess)
                {
                    // Raise SmartCard Succeeded Event
                    RaiseFingerprintSucceededEvent();
                }
                else
                {
                    // raise failed event
                    RaiseFingerprintFailedEvent(new FingerprintEventArgs("Unable to read your fingerprint. Please report to the Duty Officer"));

                    Session session = Session.Instance;
                    var     user    = (Trinity.BE.User)session[CommonConstants.USER_LOGIN];
                    fingerprintMonitor.StartVerification(OnVerificationComplete, user.RightThumbFingerprint);
                }
            }
            else
            {
                string error = Futronic.SDKHelper.FutronicSdkBase.SdkRetCode2Message(nRetCode);

                // raise show message event
                RaiseFingerprintShowMessage(new ShowMessageEventArgs(error, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning));
            }
        }
Exemplo n.º 2
0
        internal void Start()
        {
            // redirect to Fingerprint html
            _web.LoadPageHtml("Authentication/FingerPrint.html");
            _web.RunScript("$('.status-text').css('color','#000').text('Please place your finger on the reader.');");


            // start verification
            FingerprintMonitor fingerprintMonitor = FingerprintMonitor.Instance;
            Session            session            = Session.Instance;
            var user = (Trinity.BE.User)session[CommonConstants.USER_LOGIN];

            fingerprintMonitor.StartVerification(OnVerificationComplete, user.RightThumbFingerprint);
        }