示例#1
0
 public static void GenerateCtrlEvent(ConsoleExCtrlEventType Event, uint ProcessGroupId)
 {
     if (!WinAPI.GenerateConsoleCtrlEvent(Event, ProcessGroupId))
     {
         throw new ConsoleExException("ConsoleEx: Unable to generate a control event.");
     }
 }
示例#2
0
        static bool CtrlHandlerFunction(ConsoleExCtrlEventType CtrlType)
        {
            if (ConsoleControlEvent != null)
            {
                ConsoleControlEventHandlerArgs Events = new ConsoleControlEventHandlerArgs(CtrlType);
                OnConsoleControlEvent(Events);

                return(Events.CancelProcessing);
            }

            return(false);
        }
示例#3
0
文件: WinAPI.cs 项目: FoxCutter/Tools
 static public extern bool GenerateConsoleCtrlEvent(ConsoleExCtrlEventType dwCtrlEvent, uint ProcessGroupId);
示例#4
0
 public ConsoleControlEventHandlerArgs(ConsoleExCtrlEventType NewEventType)
 {
     EventType = NewEventType;
 }