Esempio n. 1
0
        /// <summary>
        /// Get the Scanner result and process it
        /// </summary>
        private void CaptureFrame()
        {
            Result rsl = AnalyseFrame();

            if (rsl != null)
            {
                //go to the visual state
                VisualStateManager.GoToState(this, ResultFoundIndicatorState, false);

                //if result is not null then ZXing found a match
                if (ScanResultFound != null)
                {
                    //Notify all listeners that we have found something
                    ScannerResultEventArgs args = new ScannerResultEventArgs(rsl);
                    ScanResultFound(this, args);
                }
                else
                {
                    AutoFocus();
                }
            }
            else
            {
                AutoFocus();
                //go to the visual state
                VisualStateManager.GoToState(this, ResultNotFoundIndicatorState, false);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Get the Scanner result and process it
        /// </summary>
        private void CaptureFrame()
        {
            Result rsl = AnalyseFrame();
            if (rsl != null)
            {
                //go to the visual state
                VisualStateManager.GoToState(this, ResultFoundIndicatorState, false);

                //if result is not null then ZXing found a match
                if(ScanResultFound != null)
                {
                    //Notify all listeners that we have found something
                    ScannerResultEventArgs args = new ScannerResultEventArgs(rsl);
                    ScanResultFound(this, args);
                }
            }
            else
            {
                //go to the visual state
                VisualStateManager.GoToState(this, ResultNotFoundIndicatorState, false);
            }
        }