/// <summary> /// Can be called at any time, is automaticlly called when CTRL_CLOSE_EVENT occurs. /// The result of calling this function is shutting down the EDT.</summary> /// <seealso cref="EventDispatchThread"/> protected virtual void Terminate() { EventDispatchThread.Terminate(); }
/// <summary> /// The class constructor. /// -Sets cursor visible = false as default. /// -Sets up the control handler for the console events. /// -Starts the EDT</summary> /// <seealso cref="EventDispatchThread"/> public ConsoleApplication() { Console.CursorVisible = false; SetConsoleCtrlHandler(ConsoleControlCheck, true); EventDispatchThread.Start(); }