private void UpdateCultureChoiceActionItem(string languageAspect, string formattingAspect, string id, string imageName) { ChoiceActionItem item = localizationNavBarGroup.Items.Find(id, ChoiceActionItemFindType.Recursive, ChoiceActionItemFindTarget.Any); if (item != null) { ViewShortcut viewShortcut = new ViewShortcut(typeof(LocalizationObject), null, Application.GetListViewId(typeof(LocalizationObject))); viewShortcut.Add(languageShortcutKey, languageAspect); viewShortcut.Add(formattingCultureShortcutKey, formattingAspect); item.Data = viewShortcut; item.ImageName = imageName; } }
protected void ProcessItemNew(IModelNavigationItem item, ChoiceActionItemCollection choiceActionItems) { ChoiceActionItem item2; if (item.View != null) { var viewShortcut = new ViewShortcut(item.View.Id, item.ObjectKey); var lvcni = item as IListViewCriteriaNavigationItem; if (lvcni != null) { viewShortcut.Add("Criteria", lvcni.Criteria + ""); } item2 = new ChoiceActionItem(item, viewShortcut); item2.Active["HasRights"] = this.HasRights(item2, item.Application.Views); } else { item2 = new ChoiceActionItem(item) { ActiveItemsBehavior = ActiveItemsBehavior.RequireActiveItems }; } item2.Active["Visible"] = item.Visible; choiceActionItems.Add(item2); foreach (IModelNavigationItem item3 in item.Items) { this.ProcessItemNew(item3, item2.Items); } this.OnNavigationItemCreated(item, item2); }
private void AddSkinNavigationItemsToGroup(ChoiceActionItemCollection items, ChoiceActionItem group) { foreach (ChoiceActionItem item in items) { ViewShortcut viewShortcut = new ViewShortcut(typeof(SkinDemoObject), null, Application.GetListViewId(typeof(SkinDemoObject))); viewShortcut.Add("SkinID", item.Id); ChoiceActionItem newItem = new ChoiceActionItem(item.Caption, item.Caption, viewShortcut); newItem.ImageName = ChooseSkinAction.ImageName; group.Items.Add(newItem); AddSkinNavigationItemsToGroup(item.Items, newItem); } }