Exemplo n.º 1
0
        /// <summary>
        ///   Builds actual array list containing menu entries matching the entry name
        /// </summary>
        /// <param name = "EntryName">Sring Entry name to be searched</param>
        /// <param name = "menuEntry">Root menu entry</param>
        /// <param name = "matchingMnuEntries">Out parameter that will have the matching entries.</param>
        /// <param name="isPulldown"></param>
        /// <returns></returns>
        private void BuildMatchingMenuValues(String entryName, IEnumerator iInnerMnt, bool isPulldown, ArrayList matchingMnuEntries)
        {
            while (iInnerMnt.MoveNext())
            {
                MenuEntry innerMnt = (MenuEntry)iInnerMnt.Current;

                String mntName = innerMnt.getName();
                if (mntName != null && (String.CompareOrdinal(mntName, entryName) == 0))
                {
                    AddMenuValue(matchingMnuEntries, isPulldown, innerMnt);
                }

                if (innerMnt.menuType() == GuiMenuEntry.MenuType.MENU)
                {
                    MenuEntryMenu menuEntMenu = (MenuEntryMenu)innerMnt;
                    IEnumerator   iMenuEntry  = menuEntMenu.iterator();

                    BuildMatchingMenuValues(entryName, iMenuEntry, isPulldown, matchingMnuEntries);
                }
            }
        }