コード例 #1
0
        public void PrintAtPosition(string item, int currentRow, bool selected)
        {
            alphaConsole.CursorVisible = false;

            if (selected)
            {
                alphaConsole.BackgroundColor = ConsoleColor.DarkCyan;
                alphaConsole.ForegroundColor = ConsoleColor.Cyan;
            }

            alphaConsole.SetCursorPosition(alphaConsole.WindowWidth / 2 - item.Length / 2, currentRow);
            alphaConsole.Write(item);

            if (selected)
            {
                alphaConsole.BackgroundColor = ConsoleColor.Black;
                alphaConsole.ForegroundColor = ConsoleColor.Gray;
            }
        }