Пример #1
0
        static void Main(string[] args)
        {
            Console.Title = "FillWords by Un1ver5e";
            Console.SetWindowSize(83, 40);
            Console.SetBufferSize(83, 40);
            MainMenuScreen MainMenu1 = new MainMenuScreen();

            InitializeScreen(MainMenu1, 4, 1);
            NewGameScreen NewGameMenu1 = new NewGameScreen();

            InitializeScreen(NewGameMenu1, 2, 2);
            while (true)
            {
                DrawNeeded(activeScreen, MainMenu1, NewGameMenu1);
                ConsoleKey CK = Console.ReadKey(true).Key;
                switch (activeScreen)
                {
                case 1:
                    MainMenu1.Scroll(CK, MainMenu1);
                    if (CK == ConsoleKey.Enter)
                    {
                        ExecuteButtonAction(MainMenu1);
                    }
                    break;

                case 2:
                    NewGameMenu1.Scroll(CK, NewGameMenu1);
                    if (CK == ConsoleKey.Enter)
                    {
                        ExecuteButtonAction(NewGameMenu1);
                    }
                    break;

                default: break;
                }
            }
        }