コード例 #1
0
        public bool BeginReading()
        {
            RecentTags.Clear();
            TagsInView.Clear();

            if (_readerProfile.InventoryMode == InventoryMode.Buffer)
            {
                StartBufferRead();
            }

            // Create a timer with a two second interval.
            _aTimer = new System.Timers.Timer(100);
            // Hook up the Elapsed event for the timer.
            _aTimer.Elapsed  += TimerTick;
            _aTimer.AutoReset = true;
            _aTimer.Enabled   = false;
            // _aTimer.Enabled = true;

            StartReadDelay();

            return(true);
        }
コード例 #2
0
        public bool StopReading()
        {
            RecentTags.Clear();
            TagsInView.Clear();

            switch (_readerProfile.InventoryMode)
            {
            case InventoryMode.Answer:
                _aTimer.Enabled = false;
                break;

            case InventoryMode.RealTime:
                _aTimer.Enabled = false;
                break;

            case InventoryMode.Buffer:
                stopBufferRead();
                break;
            }

            return(true);
        }