//=================== static void KeyboardThread(object obj) { WorkerProcessInterface pgm = (WorkerProcessInterface)obj; pgm.LogInfo("KeyboardThread Starting..."); Thread.Sleep(1000); try { while (pgm.IsAlive()) { string cmd = Console.ReadLine(); if (!pgm.IsAlive()) { break; } List <string> args = Service.ParseLine(cmd); if (args != null) { pgm.OnCommand(args); } } } catch (Exception e) { pgm.LogInfo("KeyboardThread: " + e.Message); } pgm.LogInfo("KeyboardThread Stopped"); }
protected override void OnCustomCommand(int command) { // Control_128 - Control_256 List <string> args = new List <string> { "Control_" + command }; pgm.OnCommand(args); }