Exemple #1
0
 public void Show(int x, int y)
 {
     _console.Output(x, y, "======================");
     foreach (var option in _options)
     {
         y++;
         _console.Output(x, y, option);
     }
     y++;
     _console.Output(x, y, "======================");
     y++;
     _console.Output(x, y, Prompt);
     _x = x + Prompt.Length;
     _y = y;
 }
Exemple #2
0
        public void Show(string message)
        {
            var border = new StringBuilder();
            int y      = Line;

            for (var x = 0; x < Console.WindowWidth; x++)
            {
                border.Append(BorderCharacter);
            }
            _console.Output(0, y, border.ToString());
            y++;
            _console.Output(1, y, $"{Prompt}: {message}");
            y++;
            _console.Output(0, y, border.ToString());
        }
Exemple #3
0
        public void Show()
        {
            int    halfWidth  = Console.WindowWidth / 2;
            int    halfHeight = Console.WindowHeight / 2;
            int    startX     = halfWidth - 11;
            int    startY     = halfHeight - 11;
            string line1      = "           11111111112";
            string line2      = "  12345678901234567890";
            int    x          = startX;
            int    y          = startY;

            _console.Output(x, y, line1);
            y++;
            _console.Output(x, y, line2);
            int count = 1;

            foreach (var line in Map)
            {
                y++;
                _console.Output(x, y, $"{count,2}{line}");
                count++;
            }
        }