public static void OnConsoleControlEvent(ConsoleControlEventHandlerArgs e) { if (ConsoleControlEvent != null) { ConsoleControlEvent(null, e); } }
static bool CtrlHandlerFunction(ConsoleExCtrlEventType CtrlType) { if (ConsoleControlEvent != null) { ConsoleControlEventHandlerArgs Events = new ConsoleControlEventHandlerArgs(CtrlType); OnConsoleControlEvent(Events); return(Events.CancelProcessing); } return(false); }