示例#1
0
        /// <summary>
        /// Hookup capture handler and start capture.
        /// </summary>
        /// <param name="OnCaptured">Delegate to hookup as handler of the On_Captured event</param>
        /// <returns>Returns true if successful; false if unsuccessful</returns>
        public bool StartCaptureAsync(Reader.CaptureCallback OnCaptured)
        {
            try
            {
                // Activate capture handler
                if (currentReader != null)
                {
                    currentReader.On_Captured += new Reader.CaptureCallback(OnCaptured);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error occurred in Activating the Reader: " + ex.ToString());
            }

            // Call capture
            if (!CaptureFingerAsync())
            {
                return(false);
            }

            return(true);
        }
示例#2
0
 public void CancelCaptureAndCloseReader(Reader.CaptureCallback OnCaptured)
 {
     if (currentReader != null)
     {
         currentReader.CancelCapture();
         // Dispose of reader handle and unhook reader events.
         currentReader.Dispose();
     }
 }
示例#3
0
 /// <summary>
 /// Cancel the capture and then close the reader.
 /// </summary>
 /// <param name="OnCaptured">Delegate to unhook as handler of the On_Captured event</param>
 public static void CancelCaptureAndCloseReader(Reader.CaptureCallback OnCaptured)
 {
     if (HuellaDigital.reader != null)
     {
         // Dispose of reader handle and unhook reader events.
         HuellaDigital.reader.Dispose();
         if (reset)
         {
             HuellaDigital.reader = null;
         }
     }
 }
        /// <summary>
        /// Hookup capture handler and start capture.
        /// </summary>
        /// <param name="OnCaptured">Delegate to hookup as handler of the On_Captured event</param>
        /// <returns>Returns true if successful; false if unsuccessful</returns>
        public bool StartCaptureAsync(Reader.CaptureCallback OnCaptured)
        {
            // Activate capture handler
            _reader.On_Captured += new Reader.CaptureCallback(OnCaptured);

            // Call capture
            if (!CaptureFingerAsync())
            {
                return(false);
            }

            return(true);
        }
        /// <summary>
        /// Cancel the capture and then close the reader.
        /// </summary>
        /// <param name="OnCaptured">Delegate to unhook as handler of the On_Captured event </param>
        public void CancelCaptureAndCloseReader(Reader.CaptureCallback OnCaptured)
        {
            if (reader != null)
            {
                reader.CancelCapture();

                // Dispose of reader handle and unhook reader events.
                reader.Dispose();

                if (reset)
                {
                    curReader = null;
                }
            }
        }
示例#6
0
        /// <summary>
        /// Hookup capture handler and start capture.
        /// </summary>
        /// <param name="OnCaptured">Delegate to hookup as handler of the On_Captured event</param>
        /// <returns>Returns true if successful; false if unsuccessful</returns>
        public bool StartCaptureAsync(Reader.CaptureCallback OnCaptured)
        {
            using (Tracer tracer = new Tracer("Form_Main::StartCaptureAsync"))
            {
                // Activate capture handler
                currentReader.On_Captured += new Reader.CaptureCallback(OnCaptured);

                // Call capture
                if (!CaptureFingerAsync())
                {
                    return(false);
                }

                return(true);
            }
        }
示例#7
0
        protected bool StartCaptureAsync(Reader.CaptureCallback OnCaptured)
        {
            try
            {
                // Activate capture handler
                _CurrentReader.On_Captured += new Reader.CaptureCallback(OnCaptured);

                // Call capture
                if (!CaptureFingerAsync())
                {
                    return(false);
                }
            }
            catch (Exception ex) { throw new ApplicationException(ex.Message); }
            return(true);
        }
示例#8
0
        protected void CancelCaptureAndCloseReader(Reader.CaptureCallback OnCaptured)
        {
            try
            {
                if (_CurrentReader != null)
                {
                    // Dispose of reader handle and unhook reader events.
                    _CurrentReader.Dispose();

                    if (reset)
                    {
                        CurrentReader = null;
                    }
                }
            }
            catch (Exception ex) { throw new ApplicationException(ex.Message); }
        }
示例#9
0
        /// <summary>
        /// Cancel the capture and then close the reader.
        /// </summary>
        /// <param name="OnCaptured">Delegate to unhook as handler of the On_Captured event </param>
        public void CancelCaptureAndCloseReader(Reader.CaptureCallback OnCaptured)
        {
            using (Tracer tracer = new Tracer("Form_Main::CancelCaptureAndCloseReader"))
            {
                if (currentReader != null)
                {
                    currentReader.CancelCapture();

                    // Dispose of reader handle and unhook reader events.
                    currentReader.Dispose();

                    if (reset)
                    {
                        CurrentReader = null;
                    }
                }
            }
        }
示例#10
0
        /// <summary>
        /// Hookup capture handler and start capture.
        /// </summary>
        /// <param name="OnCaptured">Delegate to hookup as handler of the On_Captured event</param>
        /// <returns>Returns true if successful; false if unsuccessful</returns>
        public bool StartCaptureAsync(Reader.CaptureCallback OnCaptured)
        {
            try
            {
                currentReader.On_Captured += new Reader.CaptureCallback(OnCaptured);

                // Call capture
                if (!CaptureFingerAsync())
                {
                    return(false);
                }
            }
            catch (Exception ex)
            {
            }
            // Activate capture handler


            return(true);
        }