Ejemplo n.º 1
0
        public override void Print()
        {
            Console.WriteLine("----------------MENU:---------------------");
            Console.WriteLine("{0}, {1}", GetName(), GetDescription());
            Console.WriteLine("-----------------------------------------");

            //Print Menus & SubMenus
            MenuIterator menuIterator = new MenuIterator(menuComponents);

            while (menuIterator.HasNext())
            {
                MenuComponent component = (MenuComponent)menuIterator.Next();
                Console.WriteLine("Component Retrived: {0}", component.GetType().Name);
                component.Print(); //Printing Individual Component(Also through this class.)
            }
        }
Ejemplo n.º 2
0
 public void Print()
 {
     AllMenus.Print();
 }