private SortedList <string, GEMenuItem> ProcessMenuItems(MenuItemsType menuItems, string parentId)
    {
        SortedList <string, GEMenuItem> processedMenuItems = new SortedList <string, GEMenuItem>();

        if (menuItems == null)
        {
            return(processedMenuItems);
        }
        foreach (MenuItemsTypeMenuItem menuItem in menuItems.MenuItem)
        {
            SortedList <string, GEText> texts        = ProcessTexts(menuItem.Texts);
            List <GEAction>             actionsToAdd = new List <GEAction>();
            foreach (ActionsType action in menuItem.Actions)
            {
                actionsToAdd.Add(ProcessActions(action, parentId));
            }
            GERequirement requirements = ProcessRequirements(menuItem.Requirements);
            GEMenuItem    newMenuItem  = new GEMenuItem(menuItem.id, null, actionsToAdd, requirements, texts, menuItem.activeAtStart, menuItem.useNumber);
            OnReferenceProcessing += delegate(object o, EventArgs e)
            {
                newMenuItem.MenuName = elementManager.GetTextElement(menuItem.menuTextId);
            };
            elementManager.AddMenuItem(newMenuItem);
            processedMenuItems.Add(menuItem.id, newMenuItem);
        }
        return(processedMenuItems);
    }
예제 #2
0
 internal void OnMenuItemClick(MenuItemsType type)
 {
     switch (type)
     {
     }
 }