private static void interfaceMenuTest()
        {
            Interfaces.MainMenu firstMainMenu = new Interfaces.MainMenu("InterFace Main Menu");
            Interfaces.Menu     dateTimeMenu  = firstMainMenu.AddSubMenu("Show Data/Time");
            dateTimeMenu.AddOperation(new DateOperation(), "Show Date");
            dateTimeMenu.AddOperation(new TimeOperation(), "Show Time");

            Interfaces.Menu versionAndDigitsMenu = firstMainMenu.AddSubMenu("Version and Digits");
            versionAndDigitsMenu.AddOperation(new CountDigitsOperation(), "Count Didits");
            versionAndDigitsMenu.AddOperation(new ShowVersionOperation(), "Show Version");

            firstMainMenu.Show();
            Console.Clear();
        }
Пример #2
0
        private static void interfaceMenuTest()
        {
            Interfaces.MainMenu firstMainMenu = new Interfaces.MainMenu("Main Menu");
            Interfaces.Menu     dateTimeMenu  = firstMainMenu.AddSubMenu("Show Data/Time");
            dateTimeMenu.AddOperation(new DateOperation(), "Show Date");
            dateTimeMenu.AddOperation(new TimeOperation(), "Show Time");

            Interfaces.Menu versionAndActionsMenu = firstMainMenu.AddSubMenu("Version and Actions");
            versionAndActionsMenu.AddOperation(new ShowVersionOperation(), "Show Version");

            Interfaces.Menu actionSubMenu = versionAndActionsMenu.AddSubMenu("Action");
            actionSubMenu.AddOperation(new CountSpacesOperation(), "Count Spaces");
            actionSubMenu.AddOperation(new CountWordsOperation(), "Count Words");

            firstMainMenu.Show();
            Console.Clear();
        }