public static void Main() { // Instantiate the component and start it. ManagementOCU cmpt = new ManagementOCU(126, 1, 161); // Start the component and the services cmpt.startComponent(); // Wait until signaled to exit Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e) { e.Cancel = true; MainClass.run = false; }; while (run) { Thread.Sleep(100); } // Shutdown the component and threads cmpt.shutdownComponent(); }
public static void Main() { // Instantiate the component and start it. ManagementOCU cmpt = new ManagementOCU(126, 1, 161); // Start the component and the services cmpt.startComponent(); // Wait until signaled to exit Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e) { e.Cancel = true; MainClass.run = false; }; while(run) { Thread.Sleep(100); } // Shutdown the component and threads cmpt.shutdownComponent(); }