예제 #1
0
 private static void AddNode(TabInfo objTab, NodeCollection objNodes, Hashtable objBreadCrumbs, PortalSettings objPortalSettings, ToolTipSource eToolTips)
 {
     Node objNode = new Node();
     if (objTab.Title == "~")
     {
         objNodes.AddBreak();
     }
     else
     {
         if (objBreadCrumbs.Contains(objTab.TabID))
         {
             objNode.BreadCrumb = true;
             if (objTab.TabID == objPortalSettings.ActiveTab.TabID)
             {
                 objNode.Selected = true;
             }
         }
         if (objTab.DisableLink)
             objNode.Enabled = false;
         objNode.ID = objTab.TabID.ToString();
         objNode.Key = objNode.ID;
         objNode.Text = objTab.LocalizedTabName;
         objNode.NavigateURL = objTab.FullUrl;
         objNode.ClickAction = eClickAction.Navigate;
         objNode.Image = objTab.IconFile;
         switch (eToolTips)
         {
             case ToolTipSource.TabName:
                 objNode.ToolTip = objTab.LocalizedTabName;
                 break;
             case ToolTipSource.Title:
                 objNode.ToolTip = objTab.Title;
                 break;
             case ToolTipSource.Description:
                 objNode.ToolTip = objTab.Description;
                 break;
         }
         objNodes.Add(objNode);
     }
 }
예제 #2
0
 public static NodeCollection GetActionNodes(ModuleAction objActionRoot, Control objControl, int intDepth)
 {
     NodeCollection objCol = new NodeCollection(objControl.ClientID);
     IActionControl objActionControl = objControl as IActionControl;
     if (objActionControl != null)
     {
         if (objActionRoot.Visible)
         {
             objCol.Add();
             Node objRoot = objCol[0];
             objRoot.ID = objActionRoot.ID.ToString();
             objRoot.Key = objActionRoot.ID.ToString();
             objRoot.Text = objActionRoot.Title;
             objRoot.NavigateURL = objActionRoot.Url;
             objRoot.Image = objActionRoot.Icon;
             objRoot.Enabled = false;
             AddChildActions(objActionRoot, objRoot, objRoot.ParentNode, objActionControl, intDepth);
         }
     }
     return objCol;
 }