Esempio n. 1
0
        internal static void CreateInterfacesMenuForTest(MainMenu i_Menu)
        {
            CountCapital count        = new CountCapital();
            MenuItem     CountCapital = new Menu.Interfaces.MenuItem("Count Capital", count, i_Menu);
            ShowVersion  version      = new ShowVersion();

            Menu.Interfaces.MenuItem        ShowVersion     = new Menu.Interfaces.MenuItem("Show Version", version, i_Menu);
            List <Menu.Interfaces.MenuItem> digitAndVersion = new List <Menu.Interfaces.MenuItem>();

            digitAndVersion.Add(CountCapital);
            digitAndVersion.Add(ShowVersion);
            Menu.Interfaces.MenuItem option1 = new Menu.Interfaces.MenuItem("Version and Digits", digitAndVersion, i_Menu);
            i_Menu.Item.SubMenu.Add(option1);

            ShowTime time = new ShowTime();

            Menu.Interfaces.MenuItem showTime = new Menu.Interfaces.MenuItem("Show Time", time, i_Menu);
            ShowDate date = new ShowDate();

            Menu.Interfaces.MenuItem        showDate    = new Menu.Interfaces.MenuItem("Show Date", date, i_Menu);
            List <Menu.Interfaces.MenuItem> dateAndTime = new List <Menu.Interfaces.MenuItem>();

            dateAndTime.Add(showTime);
            dateAndTime.Add(showDate);
            Menu.Interfaces.MenuItem option2 = new Menu.Interfaces.MenuItem("Show Date/Time", dateAndTime, i_Menu);
            i_Menu.Item.SubMenu.Add(option2);
        }
Esempio n. 2
0
        internal static void InterFaceMenu(Interfaces.MainMenu i_Menu)
        {
            Interfaces.MenuItem digitAndVersion = new Interfaces.MenuItem("Version and Digits", 1);
            i_Menu.AddToMainMenu(digitAndVersion);

            CountCapital count = new CountCapital();

            Interfaces.MenuItem countCapital = new Interfaces.MenuItem("Count Capital", 1, count);
            digitAndVersion.AddToSubMenu(countCapital);

            ShowVersion version = new ShowVersion();

            Interfaces.MenuItem showVersion = new Interfaces.MenuItem("Show Version", 2, version);
            digitAndVersion.AddToSubMenu(showVersion);

            Interfaces.MenuItem dateAndTime = new Interfaces.MenuItem("Show Date/Time", 2);
            i_Menu.AddToMainMenu(dateAndTime);

            ShowTime time = new ShowTime();

            Interfaces.MenuItem showTime = new Interfaces.MenuItem("Show Time", 1, time);
            dateAndTime.AddToSubMenu(showTime);

            ShowDate date = new ShowDate();

            Interfaces.MenuItem showDate = new Interfaces.MenuItem("Show Date", 2, date);
            dateAndTime.AddToSubMenu(showDate);

            i_Menu.Show();
        }