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); }
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); }