Example #1
0
        static void Main(string[] args)
        {
            try
            {
                Serfid appSerfid = new Serfid();
                appSerfid.Run();

                _serfidPort = new SerialPort("COM3");
                _serfidPort.Open();

                System.Console.WriteLine("Serfid reading on port: COM3");
                while (true)
                {
                    System.Console.WriteLine("\nWaiting for readings...");
                    string reading = _serfidPort.ReadLine();
                    appSerfid.ReadWeft(reading);

                    System.Console.SetCursorPosition(0, System.Console.CursorTop - 1);
                    string result = string.Format("Tag {0} processed successful", reading.Replace("\r", ""));
                    System.Console.WriteLine(result);
                }
            }
            finally
            {
                _serfidPort.Close();
            }
        }
Example #2
0
        public SerfidService()
        {
            InitializeComponent();

            _appSerfid = new Serfid();
            _listenerPort = new ListenerPort();
        }
Example #3
0
 static void Main(string[] args)
 {
     Serfid appSerfid = new Serfid();
     appSerfid.Run();
     char option = 's';
     while (option == 's')
     {
         System.Console.WriteLine("Desea insertar una lectura s/n?:");
         ConsoleKeyInfo keyInfo = System.Console.ReadKey();
         option = keyInfo.KeyChar;
         if (option == 's')
         {
             string reading = System.Console.ReadLine();
             appSerfid.ReadWeft(reading);
         }
     }
     
 }
Example #4
0
 public RegisterDevice()
 {
     InitializeComponent();
     _serfidApp = new Serfid();
     CheckForIllegalCrossThreadCalls = false;
 }