private void AppendGroupId(HtmlRenderer renderer, string groupId, TabItemBlock item)
 {
     renderer.Write(groupId);
     renderer.Write("_");
     renderer.Write(item.Id);
     if (!string.IsNullOrEmpty(item.Condition))
     {
         renderer.Write("_");
         renderer.Write(item.Condition);
     }
 }
Beispiel #2
0
        private int ApplyTabVisible(List <string[]> tabSelectionInfo, List <TabItemBlock> items)
        {
            var firstVisibleTab = -1;

            for (var i = 0; i < items.Count; i++)
            {
                var tab     = items[i];
                var visible = string.IsNullOrEmpty(tab.Condition) || tabSelectionInfo.Any(t => t[0] == tab.Condition);
                if (visible && firstVisibleTab == -1)
                {
                    firstVisibleTab = i;
                }
                if (tab.Visible != visible)
                {
                    items[i] = new TabItemBlock(tab.Id, tab.Condition, tab.Title, tab.Content, visible);
                }
            }

            return(firstVisibleTab);
        }