Ejemplo n.º 1
0
        public void DisplayRFID(string RFID)
        {
            Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal,
                                   (UI_Interface) delegate()
            {
                if (TextBoxRFID.Text.Length > 0)
                {
                    TextBoxRFID.AppendText(Environment.NewLine);

                    TextBoxRFID.ScrollToEnd();
                }

                /* Comparing whether a valid RFID */


                String[] readerString = new String[8];
                XmlReader reader      = XmlReader.Create("Valid.xml");
                while (reader.Read())
                {
                    if (reader.NodeType == XmlNodeType.Element)
                    {
                        if (RFID == reader.GetAttribute("ID"))
                        {
                            TextBoxRFID.AppendText(RFID);
                            PlaySound();
                        }
                    }
                }

                reader.Close();
            });
        }
Ejemplo n.º 2
0
 public void DisplayErrorMsg(string ErrorMsg)
 {
     Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal,
                            (UI_Interface) delegate()
     {
         TextBoxRFID.AppendText(ErrorMsg);
     });
 }