Beispiel #1
0
 public void Stop()
 {
     try
     {
         _reader.StopReading();
     }
     catch (Exception)
     {
         _reader = ThingMagic.Reader.Create(string.Concat("tcp://", readerUri));
         Connect();
     }
 }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        private void OnTagRead(Object sender, TagReadDataEventArgs e)
        {
            bool check_Unknown = false;
            bool check_Book    = false;

            try
            {
                Application.Current.Dispatcher.BeginInvoke(
                    DispatcherPriority.Background,
                    new Action(() =>
                {
                    if (toggelReader == false)
                    {
                        Console.WriteLine("Read Booklisting End");
                        reader.StopReading();
                        return;
                    }
                    check_Unknown = UnknownRFIDList.CheckList(e);
                    UpdateUnkownRFID_DG(check_Unknown);
                }));

                Application.Current.Dispatcher.BeginInvoke(
                    DispatcherPriority.Background,
                    new Action(() =>
                {
                    if (toggelReader == false)
                    {
                        Console.WriteLine("Read Booklisting End");
                        reader.StopReading();
                        return;
                    }

                    check_Book = BookListing.CheckList(e);
                    UpdateBook_DG(check_Book);
                }));
            }
            catch (Exception ex) {
                Console.WriteLine(ex);
            }
        }