Esempio n. 1
0
        public void MenuDisplay()
        {
            int userSelectedChoice;

            do
            {
                Console.Clear();
                Console.WriteLine(this.Topic);
                foreach (char underLinePrinter in this.Topic)
                {
                    Console.Write("═");
                }

                Console.WriteLine(Environment.NewLine);
                getUserSelectedChoice(out userSelectedChoice);
                HierarchicalMenu choosenMenu = r_AttachedItems[userSelectedChoice] as HierarchicalMenu;

                Console.Clear();
                if (choosenMenu == null)
                {
                    AttachedItems[userSelectedChoice].DoAction();
                }
                else
                {
                    choosenMenu.MenuDisplay();
                }
            }while (userSelectedChoice != k_GoToUpperMenuIndex);
        }
Esempio n. 2
0
 public MainMenu(string i_MenuListTopic)
 {
     m_MenuList = new HierarchicalMenu(i_MenuListTopic);
     m_MenuList.AttachedItems[k_ExitrMenuIndex].Topic = k_ExitrMenuTopic;
 }