Ejemplo n.º 1
0
        private static Ex04.Menus.Interfaces.MainMenu buildInterfaceMenu()
        {
            Ex04.Menus.Interfaces.MainMenu mainMenu = new Ex04.Menus.Interfaces.MainMenu("Main Menu (Interfaces)");

            Ex04.Menus.Interfaces.SubMenu versionAndCapitals = new Ex04.Menus.Interfaces.SubMenu("Version and Capitals");
            versionAndCapitals.Add(new Ex04.Menus.Interfaces.ActionItem("Count Capitals", new MenuOptionsForTester.CountCaptials()));
            versionAndCapitals.Add(new Ex04.Menus.Interfaces.ActionItem("Show Version", new MenuOptionsForTester.ShowVersion()));
            mainMenu.Add(versionAndCapitals);

            Ex04.Menus.Interfaces.SubMenu dateAndTime = new Ex04.Menus.Interfaces.SubMenu("Show Date/Time");
            dateAndTime.Add(new Ex04.Menus.Interfaces.ActionItem("Show Time", new MenuOptionsForTester.ShowCurrTime()));
            dateAndTime.Add(new Ex04.Menus.Interfaces.ActionItem("Show Date", new MenuOptionsForTester.ShowCurrDate()));
            mainMenu.Add(dateAndTime);

            return(mainMenu);
        }