예제 #1
0
 public WindowsDriver()
 {
     WinConsole = new WindowsConsole();
     cols       = Console.WindowWidth;
     rows       = Console.WindowHeight - 1;
     ResizeScreen();
     UpdateOffScreen();
 }
예제 #2
0
        public WindowsDriver()
        {
            winConsole = new WindowsConsole();

            cols = Console.WindowWidth;
            rows = Console.WindowHeight - 1;
            WindowsConsole.SmallRect.MakeEmpty(ref damageRegion);

            ResizeScreen();
            UpdateOffScreen();

            Task.Run((Action)WindowsInputHandler);
        }
예제 #3
0
        public WindowsDriver()
        {
            Colors.TopLevel = new ColorScheme();

            Colors.TopLevel.Normal    = MakeColor(ConsoleColor.Green, ConsoleColor.Black);
            Colors.TopLevel.Focus     = MakeColor(ConsoleColor.White, ConsoleColor.DarkCyan);
            Colors.TopLevel.HotNormal = MakeColor(ConsoleColor.DarkYellow, ConsoleColor.Black);
            Colors.TopLevel.HotFocus  = MakeColor(ConsoleColor.DarkYellow, ConsoleColor.DarkCyan);

            winConsole = new WindowsConsole();

            cols = Console.WindowWidth;
            rows = Console.WindowHeight;
            WindowsConsole.SmallRect.MakeEmpty(ref damageRegion);

            ResizeScreen();
            UpdateOffScreen();

            Task.Run((Action)WindowsInputHandler);
        }
예제 #4
0
        void WindowsInputHandler()
        {
            while (true)
            {
                waitForProbe.WaitOne();

                uint numberEventsRead = 0;

                WindowsConsole.ReadConsoleInput(winConsole.InputHandle, records, 1, out numberEventsRead);
                if (numberEventsRead == 0)
                {
                    result = null;
                }
                else
                {
                    result = records;
                }

                eventReady.Set();
            }
        }