Beispiel #1
0
        /// <summary>
        ///   Refresh the text of the menu entry.
        ///   If this menu entry is a menu itself, call this method recursively.
        /// </summary>
        public void refreshRecursiveMenuesEntryMls(MenuEntry menuEntry)
        {
            // 1st refresh the menuentry text
            menuEntry.refreshText();

            // for menu type entry, do a recursive call for each entry.
            if (menuEntry.menuType() == GuiMenuEntry.MenuType.MENU)
            {
                MenuEntryMenu menuEntryMenu  = (MenuEntryMenu)menuEntry;
                IEnumerator   iMenuEntryMenu = menuEntryMenu.iterator();
                while (iMenuEntryMenu.MoveNext())
                {
                    MenuEntry menuEntryNext = (MenuEntry)iMenuEntryMenu.Current;
                    // recursive call for each menu entry.
                    refreshRecursiveMenuesEntryMls(menuEntryNext);
                }
            }
        }