Esempio n. 1
0
        //===================

        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");
        }
Esempio n. 2
0
        protected override void OnCustomCommand(int command)
        {
            // Control_128 - Control_256
            List <string> args = new List <string> {
                "Control_" + command
            };

            pgm.OnCommand(args);
        }