Exemplo n.º 1
0
        private static void DisplayMenu()
        {
            ScrollMenu scrollMenu = new ScrollMenu()
            {
                Margin = 7,
                HorizontalAlignment = DustInTheWind.ConsoleTools.HorizontalAlignment.Center,
                EraseAfterClose     = true
            };

            scrollMenu.AddItems(new IMenuItem[]
            {
                new LabelMenuItem
                {
                    Text    = "New Game",
                    Command = new NewGame(SuperPlay)
                },
                //new YesNoMenuItem
                //{
                //    Text = "Save Game",
                //    Command = new SaveGameCommand(SaveGameToDb,  _gameProg)
                //},
                new LabelMenuItem
                {
                    Text    = "Load&Play",
                    Command = new LoadGameCommand(LoadGameList)
                },
                new LabelMenuItem
                {
                    Text    = "Show Score",
                    Command = new ShowScoreMenu(ShowScore)
                },
                new LabelMenuItem
                {
                    Text    = "  Exit  ",
                    Command = new ExitGame(ExitGame)
                }
            });

            scrollMenu.Display();
        }