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(); } }
public SerfidService() { InitializeComponent(); _appSerfid = new Serfid(); _listenerPort = new ListenerPort(); }
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); } } }
public RegisterDevice() { InitializeComponent(); _serfidApp = new Serfid(); CheckForIllegalCrossThreadCalls = false; }