/// <summary>
        /// Runs the menu.
        /// </summary>

        private static void RunMenu()
        {
            CHOICES choice = (CHOICES)menu.GetChoice();

            while (choice != CHOICES.QUIT)
            {
                switch (choice)
                {
                case CHOICES.SET:
                    createNewBTree();           // Create a new BTree with 500 random integers
                    Utility.PressAnyKey();
                    break;

                case CHOICES.DISPLAY:
                    DisplayBTree();             // Display BTree
                    Utility.PressAnyKey();
                    break;

                case CHOICES.ADD:
                    AddValue();                 // Add a user-specified integer to the BTree
                    Utility.PressAnyKey();
                    break;

                case CHOICES.FIND:
                    FindValue();                // Find a user-specified integer in the BTree
                    Utility.PressAnyKey();
                    break;
                }

                choice = (CHOICES)menu.GetChoice();
            }
        }
Ejemplo n.º 2
0
 public Level(CHOICES p_iChoiceUser)
 {
     m_eChoiceUser = p_iChoiceUser;
 }