示例#1
0
        private void WriteErrorMessage(string errorMessage)
        {
            var(left, _) = _consoleDriver.GetCursorPosition();

            var writtenErrorLines = _consoleDriver.WriteLine();

            writtenErrorLines += _consoleDriver.Write($"{Symbol.Error} {errorMessage}", ConsoleColor.Red);

            _consoleDriver.SetCursorPosition(left, _consoleDriver.CursorTop - writtenErrorLines);

            _writtenErrorLines += writtenErrorLines;
        }
示例#2
0
 public static void SetCursorPosition(int left, int top)
 {
     driver.SetCursorPosition(left, top);
 }