Example #1
0
        public ConsoleKeyInfo ReadInput()
        {
            _console.SendCursorToBottom();

            while (!Console.KeyAvailable)
            {
                Thread.Sleep(10);
            }
            ;

            ConsoleKeyInfo keyInfo = Console.ReadKey();

            _console.SendCursorToBottom();

            return(keyInfo);
        }
        public void DrawHorizLine(int row, int columnFrom, int columnTo, string character)
        {
            if (!_console.IsValidCoord(columnFrom, row))
            {
                return;
            }
            if (!_console.IsValidCoord(columnTo, row))
            {
                return;
            }

            if (columnFrom > columnTo)
            {
                int columnAux = columnTo;
                columnTo   = columnFrom;
                columnFrom = columnAux;
            }

            _console.Write(columnFrom, row, character, columnTo - columnFrom + 1);
            _console.SendCursorToBottom();
        }