예제 #1
0
        static void Main(string[] args)
        {
            MenuCreator    menuCreator    = new MenuCreator();
            CollectionMenu collectionMenu = menuCreator.CreateCollectionMenu();

            collectionMenu.ShowMenu(0);

            Console.ReadKey(true);
        }
예제 #2
0
        /// <summary>
        /// Creates the select language Menu
        /// </summary>
        /// <returns></returns>
        private Menu CreateChooseLanguageMenu()
        {
            Menu menu = new Menu()
            {
                MenuId      = 0,
                Description = locService.GetString("Please_Select_Language").ToUpper(),
                MenuItems   =
                {
                    new MenuItem()
                    {
                        Description = locService.GetString("Language_Selected_English"),
                        Actions     = new List <Action>()
                        {
                            () => locService.ChangeLanguage(Languages.en), () => CreateCollectionMenu(), () => menuCollection.ShowMenu(1)
                        },
                    },
                    new MenuItem()
                    {
                        Description = locService.GetString("Language_Selected_Spanish"),
                        Actions     = new List <Action>()
                        {
                            () => locService.ChangeLanguage(Languages.es), () => CreateCollectionMenu(), () => menuCollection.ShowMenu(1)
                        },
                    }
                }
            };

            return(menu);
        }