• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# WebControls.DNNNode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DotNetNuke.UI.WebControls.DNNNode的典型用法代码示例。如果您正苦于以下问题:C# DNNNode类的具体用法?C# DNNNode怎么用?C# DNNNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DNNNode类属于DotNetNuke.UI.WebControls命名空间,在下文中一共展示了DNNNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MenuNode

        public MenuNode(DNNNode dnnNode, MenuNode parent)
        {
            TabId = Convert.ToInt32(dnnNode.ID);
            Text = dnnNode.Text;
            Url = (dnnNode.ClickAction == eClickAction.PostBack)
                    ? "postback:" + dnnNode.ID
                    : String.IsNullOrEmpty(dnnNode.JSFunction) ? dnnNode.NavigateURL : "javascript:" + dnnNode.JSFunction;
            Enabled = dnnNode.Enabled;
            Selected = dnnNode.Selected;
            Breadcrumb = dnnNode.BreadCrumb;
            Separator = dnnNode.IsBreak;
            Icon = dnnNode.Image;
            Target = dnnNode.Target;
            Title = null;
            Keywords = null;
            Description = null;
            Parent = parent;
            CommandName = dnnNode.get_CustomAttribute("CommandName");
            CommandArgument = dnnNode.get_CustomAttribute("CommandArgument");

            DNNAbstract.DNNNodeToMenuNode(dnnNode, this);

            if ((dnnNode.DNNNodes != null) && (dnnNode.DNNNodes.Count > 0))
                Children = ConvertDNNNodeCollection(dnnNode.DNNNodes, this);
        }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:25,代码来源:MenuNode.cs


示例2: DNNTxtBannerGroup_PopulateOnDemand

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// DNNTxtBannerGroup_PopulateOnDemand runs when something is entered on the
        /// BannerGroup field
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// 	[vmasanas]	9/29/2006	Implement a callback to display current groups
        ///  to user so the BannerGroup can be easily selected
        /// </history>
        /// -----------------------------------------------------------------------------
        protected void DNNTxtBannerGroup_PopulateOnDemand(object source, DNNTextSuggestEventArgs e)
        {
            DataTable dt;
            DNNNode objNode;

            var objBanners = new BannerController();
            dt = objBanners.GetBannerGroups(PortalId);
            DataRow[] dr;
            dt.CaseSensitive = false;
            dr = dt.Select("GroupName like '" + e.Text + "%'");
            foreach (DataRow d in dr)
            {
                objNode = new DNNNode(d["GroupName"].ToString());
                objNode.ID = e.Nodes.Count.ToString();
                e.Nodes.Add(objNode);
            }
        }
开发者ID:sunsiz,项目名称:dnn6-chinese-language-pack,代码行数:29,代码来源:BannerOptions.ascx.cs


示例3: ProcessTab

        private static void ProcessTab(DNNNode objRootNode, TabInfo objTab, Hashtable objTabLookup, Hashtable objBreadCrumbs, int intLastBreadCrumbId, ToolTipSource eToolTips, int intStartTabId,
                                       int intDepth, int intNavNodeOptions)
        {
            PortalSettings objPortalSettings = PortalController.GetCurrentPortalSettings();

            DNNNodeCollection objRootNodes = objRootNode.DNNNodes;

            bool showHidden = (intNavNodeOptions & (int)NavNodeOptions.IncludeHiddenNodes) == (int)NavNodeOptions.IncludeHiddenNodes;

            if (CanShowTab(objTab, TabPermissionController.CanAdminPage(), true, showHidden)) //based off of tab properties, is it shown
            {
                DNNNodeCollection objParentNodes;
                DNNNode objParentNode = objRootNodes.FindNode(objTab.ParentId.ToString());
                bool blnParentFound = objParentNode != null;
                if (objParentNode == null)
                {
                    objParentNode = objRootNode;
                }
                objParentNodes = objParentNode.DNNNodes;
                if (objTab.TabID == intStartTabId)
                {
					//is this the starting tab
                    if ((intNavNodeOptions & (int) NavNodeOptions.IncludeParent) != 0)
                    {
						//if we are including parent, make sure there is one, then add
                        if (objTabLookup[objTab.ParentId] != null)
                        {
                            AddNode((TabInfo) objTabLookup[objTab.ParentId], objParentNodes, objBreadCrumbs, objPortalSettings, eToolTips);
                            objParentNode = objRootNodes.FindNode(objTab.ParentId.ToString());
                            objParentNodes = objParentNode.DNNNodes;
                        }
                    }
                    if ((intNavNodeOptions & (int) NavNodeOptions.IncludeSelf) != 0)
                    {
						//if we are including our self (starting tab) then add
                        AddNode(objTab, objParentNodes, objBreadCrumbs, objPortalSettings, eToolTips);
                    }
                }
                else if (((intNavNodeOptions & (int) NavNodeOptions.IncludeSiblings) != 0) && IsTabSibling(objTab, intStartTabId, objTabLookup))
                {
					//is this a sibling of the starting node, and we are including siblings, then add it
                    AddNode(objTab, objParentNodes, objBreadCrumbs, objPortalSettings, eToolTips);
                }
                else
                {
                    if (blnParentFound) //if tabs parent already in hierarchy (as is the case when we are sending down more than 1 level)
                    {
						//parent will be found for siblings.  Check to see if we want them, if we don't make sure tab is not a sibling
                        if (((intNavNodeOptions & (int) NavNodeOptions.IncludeSiblings) != 0) || IsTabSibling(objTab, intStartTabId, objTabLookup) == false)
                        {
							//determine if tab should be included or marked as pending
                            bool blnPOD = (intNavNodeOptions & (int) NavNodeOptions.MarkPendingNodes) != 0;
                            if (IsTabPending(objTab, objParentNode, objRootNode, intDepth, objBreadCrumbs, intLastBreadCrumbId, blnPOD))
                            {
                                if (blnPOD)
                                {
                                    objParentNode.HasNodes = true; //mark it as a pending node
                                }
                            }
                            else
                            {
                                AddNode(objTab, objParentNodes, objBreadCrumbs, objPortalSettings, eToolTips);
                            }
                        }
                    }
                    else if ((intNavNodeOptions & (int) NavNodeOptions.IncludeSelf) == 0 && objTab.ParentId == intStartTabId)
                    {
						//if not including self and parent is the start id then add 
                        AddNode(objTab, objParentNodes, objBreadCrumbs, objPortalSettings, eToolTips);
                    }
                }
            }
        }
开发者ID:biganth,项目名称:Curt,代码行数:73,代码来源:Navigation.cs


示例4: Contains

        //Protected Overrides Sub OnInsert(ByVal index As Integer, ByVal value As Object)
        //	If m_bNodeCollectionInterfaceCall = False Then Me.InsertAfter(index, CType(value, DNNNode))
        //End Sub

        //Protected Overrides Sub OnRemove(ByVal index As Integer, ByVal value As Object)
        //	If m_bNodeCollectionInterfaceCall = False Then Me.Remove(CType(value, DNNNode))
        //End Sub

        //Protected Overrides Sub OnSet(ByVal index As Integer, ByVal oldValue As Object, ByVal newValue As Object)
        //	Me.Item(index) = CType(newValue, DNNNode)
        //End Sub

        //Protected Overrides Sub OnClear()
        //	Me.Clear()
        //End Sub

        //Public Shadows Sub Clear()
        //	Dim i As Integer
        //	For i = Me.XMLNode.ChildNodes.Count - 1 To 0 Step -1
        //		Me.XMLNode.RemoveChild(Me.XMLNode.ChildNodes(i))
        //	Next
        //End Sub

        public bool Contains( DNNNode value )
        {
            if( this.FindNode( value.ID ) == null )
            {
                return false;
            }
            else
            {
                return true;
            }
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:34,代码来源:DNNNodeCollection.cs


示例5: IsTabPending

        private static bool IsTabPending(TabInfo objTab, DNNNode objParentNode, DNNNode objRootNode, int intDepth, Hashtable objBreadCrumbs, int intLastBreadCrumbId, bool blnPOD)
        {
			//
            //A
            //|
            //--B
            //| |
            //| --B-1
            //| | |
            //| | --B-1-1
            //| | |
            //| | --B-1-2
            //| |
            //| --B-2
            //|   |
            //|   --B-2-1
            //|   |
            //|   --B-2-2
            //|
            //--C
            //  |
            //  --C-1
            //  | |
            //  | --C-1-1
            //  | |
            //  | --C-1-2
            //  |
            //  --C-2
            //    |
            //    --C-2-1
            //    |
            //    --C-2-2

            //if we aren't restricting depth then its never pending
            if (intDepth == -1)
            {
                return false;
            }
			
			//parents level + 1 = current node level
            //if current node level - (roots node level) <= the desired depth then not pending
            if (objParentNode.Level + 1 - objRootNode.Level <= intDepth)
            {
                return false;
            }
			
			
            //--- These checks below are here so tree becomes expands to selected node ---
            if (blnPOD)
            {
                //really only applies to controls with POD enabled, since the root passed in may be some node buried down in the chain
                //and the depth something like 1.  We need to include the appropriate parent's and parent siblings
                //Why is the check for POD required?  Well to allow for functionality like RootOnly requests.  We do not want any children
                //regardless if they are a breadcrumb

                //if tab is in the breadcrumbs then obviously not pending
                if (objBreadCrumbs.Contains(objTab.TabID))
                {
                    return false;
                }
				
				//if parent is in the breadcrumb and it is not the last breadcrumb then not pending
                //in tree above say we our breadcrumb is (A, B, B-2) we want our tree containing A, B, B-2 AND B-1 AND C since A and B are expanded
                //we do NOT want B-2-1 and B-2-2, thus the check for Last Bread Crumb
                if (objBreadCrumbs.Contains(objTab.ParentId) && intLastBreadCrumbId != objTab.ParentId)
                {
                    return false;
                }
            }
            return true;
        }
开发者ID:biganth,项目名称:Curt,代码行数:71,代码来源:Navigation.cs


示例6: AddSeparator

 private void AddSeparator(string strType, DNNNode objPrevNode, DNNNode objNextNode, MenuNode objMenuItem)
 {
     string strLeftHTML = SeparatorLeftHTML + SeparatorLeftHTMLBreadCrumb + SeparatorLeftHTMLActive;
     string strRightHTML = SeparatorRightHTML + SeparatorRightHTMLBreadCrumb + SeparatorRightHTMLActive;
     string strHTML = SeparatorHTML + strLeftHTML + strRightHTML;
     if (!String.IsNullOrEmpty(strHTML))
     {
         string strSeparator = "";
         string strSeparatorLeftHTML = "";
         string strSeparatorRightHTML = "";
         string strSeparatorClass = "";
         string strLeftSeparatorClass = "";
         string strRightSeparatorClass = "";
         if (string.IsNullOrEmpty(strLeftHTML) == false)
         {
             strLeftSeparatorClass = GetSeparatorText(CSSLeftSeparator, CSSLeftSeparatorBreadCrumb, CSSLeftSeparatorSelection, objNextNode);
             strSeparatorLeftHTML = GetSeparatorText(SeparatorLeftHTML, SeparatorLeftHTMLBreadCrumb, SeparatorLeftHTMLActive, objNextNode);
         }
         if (string.IsNullOrEmpty(SeparatorHTML) == false)
         {
             if (!String.IsNullOrEmpty(CSSSeparator))
             {
                 strSeparatorClass = CSSSeparator;
             }
             strSeparator = SeparatorHTML;
         }
         if (string.IsNullOrEmpty(strRightHTML) == false)
         {
             strRightSeparatorClass = GetSeparatorText(CSSRightSeparator, CSSRightSeparatorBreadCrumb, CSSRightSeparatorSelection, objNextNode);
             strSeparatorRightHTML = GetSeparatorText(SeparatorRightHTML, SeparatorRightHTMLBreadCrumb, SeparatorRightHTMLActive, objNextNode);
         }
         if (string.IsNullOrEmpty(strSeparatorRightHTML) == false)
         {
             objMenuItem.RightHTML += GetSeparatorMarkup(strRightSeparatorClass, strSeparatorRightHTML);
         }
         if (string.IsNullOrEmpty(strSeparator) == false && strType == "All")
         {
             objMenuItem.LeftHTML += GetSeparatorMarkup(strSeparatorClass, strSeparator);
         }
         if (string.IsNullOrEmpty(strSeparatorLeftHTML) == false)
         {
             objMenuItem.LeftHTML += GetSeparatorMarkup(strLeftSeparatorClass, strSeparatorLeftHTML);
         }
     }
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:45,代码来源:DNNMenuNavigationProvider.cs


示例7: BuildNodes

 private void BuildNodes(DNNNode objNode)
 {
     DNNNodeCollection objNodes;
     objNodes = GetNavigationNodes(objNode);
     Control.ClearNodes(); //since we always bind we need to clear the nodes for providers that maintain their state
     Bind(objNodes);
 }
开发者ID:VegasoftTI,项目名称:Dnn.Platform,代码行数:7,代码来源:SolPartMenu.cs


示例8: AddNode

        /// <summary>
        /// Assigns common properties from passed in tab to newly created DNNNode that is added to the passed in DNNNodeCollection
        /// </summary>
        /// <param name="objTab">Tab to base DNNNode off of</param>
        /// <param name="objNodes">Node collection to append new node to</param>
        /// <param name="objBreadCrumbs">Hashtable of breadcrumb IDs to efficiently determine node's BreadCrumb property</param>
        /// <param name="objPortalSettings">Portal settings object to determine if node is selected</param>
        /// <remarks>
        /// Logic moved to separate sub to make GetNavigationNodes cleaner
        /// </remarks>
        /// <history>
        /// 	[Jon Henning]	8/9/2005	Created
        /// </history>
        /// <param name="eToolTips"></param>
        private static void AddNode(TabInfo objTab, DNNNodeCollection objNodes, Hashtable objBreadCrumbs, PortalSettings objPortalSettings, ToolTipSource eToolTips)
        {
            DNNNode objNode = new DNNNode();

            if (objTab.Title == "~") // NEW!
            {
                //A title (text) of ~ denotes a break
                objNodes.AddBreak();
            }
            else
            {
                //assign breadcrumb and selected properties
                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.TabName;
                objNode.NavigateURL = objTab.FullUrl;
                objNode.ClickAction = eClickAction.Navigate;

                //admin tabs have their images found in a different location, since the DNNNode has no concept of an admin tab, this must be set here
                if (objTab.IsAdminTab)
                {
                    if (objTab.IconFile != "")
                    {
                        objNode.Image = Globals.ApplicationPath + "/images/" + objTab.IconFile;
                    }
                }
                else
                {
                    if (objTab.IconFile != "")
                    {
                        objNode.Image = objTab.IconFile;
                    }
                }

                switch (eToolTips)
                {
                    case ToolTipSource.TabName:
                        objNode.ToolTip = objTab.TabName;
                        break;
                    case ToolTipSource.Title:
                        objNode.ToolTip = objTab.Title;
                        break;
                    case ToolTipSource.Description:
                        objNode.ToolTip = objTab.Description;
                        break;
                }

                objNodes.Add(objNode);
            }
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:78,代码来源:Navigation.cs


示例9: ProcessNodes

        private void ProcessNodes(DNNNode objParent)
        {
            if (!String.IsNullOrEmpty(objParent.JSFunction))
            {
                ClientAPI.RegisterClientVariable(Page, "__dnn_CSAction_" + Control.NavigationControl.ClientID + "_" + objParent.ID, objParent.JSFunction, true);
            }
            objParent.ClickAction = eClickAction.None; //since GO button is handling actions dont allow selected index change fire postback

            foreach (DNNNode objNode in objParent.DNNNodes)
            {
                ProcessNodes(objNode);
            }
        }
开发者ID:rcedev,项目名称:evans-software-solutions,代码行数:13,代码来源:DropDownActions.ascx.cs


示例10: ProcessNodes

		/// -----------------------------------------------------------------------------
		/// <summary>
		/// ProcessNodes proceses a single node and its children
		/// </summary>
		/// <param name="objParent">The Node to process</param>
		/// <history>
		/// 	[cnurse]	12/24/2007  created
		/// </history>
		/// -----------------------------------------------------------------------------
        private void ProcessNodes(DNNNode objParent)
        {
            if (!String.IsNullOrEmpty(objParent.JSFunction))
            {
                objParent.JSFunction = string.Format("if({0}){{{1}}};", objParent.JSFunction, Page.ClientScript.GetPostBackEventReference(ProviderControl.NavigationControl, objParent.ID));
            }
            foreach (DNNNode objNode in objParent.DNNNodes)
            {
                ProcessNodes(objNode);
            }
        }
开发者ID:biganth,项目名称:Curt,代码行数:20,代码来源:ActionsMenu.cs


示例11: AddChildActions

 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Recursive function to add module's actions to the DNNNodeCollection based off of passed in ModuleActions
 /// </summary>
 /// <param name="objParentAction">Parent action</param>
 /// <param name="objParentNode">Parent node</param>
 /// <param name="objActionControl">ActionControl to base actions off of</param>
 /// <remarks>
 /// </remarks>
 /// <history>
 /// 	[Jon Henning]	8/9/2005	Created
 /// </history>
 /// -----------------------------------------------------------------------------
 private static void AddChildActions(ModuleAction objParentAction, DNNNode objParentNode, IActionControl objActionControl)
 {
     AddChildActions(objParentAction, objParentNode, objParentNode, objActionControl, -1);
 }
开发者ID:biganth,项目名称:Curt,代码行数:17,代码来源:Navigation.cs


示例12: AddChildActions

        /// <summary>
        /// Recursive function to add module's actions to the DNNNodeCollection based off of passed in ModuleActions
        /// </summary>
        /// <param name="objParentAction">Parent action</param>
        /// <param name="objParentNode">Parent node</param>
        /// <param name="objRootNode"></param>
        /// <param name="objModule">Module to base actions off of</param>
        /// <param name="objUserInfo">User Info Object</param>
        /// <param name="intDepth">How many levels deep should be populated</param>
        /// <remarks>
        /// </remarks>
        /// <history>
        /// 	[Jon Henning]	5/15/2006	Created
        /// </history>
        private static void AddChildActions(ModuleAction objParentAction, DNNNode objParentNode, DNNNode objRootNode, ActionBase objModule, UserInfo objUserInfo, int intDepth)
        {
            // Add Menu Items

            foreach (ModuleAction objAction in objParentAction.Actions)
            {
                bool blnPending = IsActionPending(objParentNode, objRootNode, intDepth);
                if (objAction.Title == "~")
                {
                    if (blnPending == false)
                    {
                        //A title (text) of ~ denotes a break
                        objParentNode.DNNNodes.AddBreak();
                    }
                }
                else
                {
                    //if action is visible and user has permission 
                    if (objAction.Visible & PortalSecurity.HasNecessaryPermission(objAction.Secure, (PortalSettings)(HttpContext.Current.Items["PortalSettings"]), objModule.ModuleConfiguration, objUserInfo.UserID.ToString()))
                    {
                        //(if edit mode and not admintab and not admincontrol)
                        if (blnPending)
                        {
                            objParentNode.HasNodes = true;
                        }
                        else
                        {
                            int i = objParentNode.DNNNodes.Add();
                            DNNNode objNode = objParentNode.DNNNodes[i];
                            objNode.ID = objAction.ID.ToString();
                            objNode.Key = objAction.ID.ToString();
                            objNode.Text = objAction.Title; //no longer including SPACE in generic node collection, each control must handle how they want to display
                            // HACK : Modified to not error if object is null.
                            //if (objAction.ClientScript.Length > 0)
                            if (!String.IsNullOrEmpty(objAction.ClientScript))
                            {
                                objNode.JSFunction = objAction.ClientScript;
                                objNode.ClickAction = eClickAction.None;
                            }
                            else
                            {
                                objNode.NavigateURL = objAction.Url;
                                // HACK : Modified to handle null string in objNode.NavigateURL
                                //if (objAction.UseActionEvent == false && objNode.NavigateURL.Length > 0)
                                if (objAction.UseActionEvent == false && !String.IsNullOrEmpty(objNode.NavigateURL))
                                {
                                    objNode.ClickAction = eClickAction.Navigate;
                                }
                                else
                                {
                                    objNode.ClickAction = eClickAction.PostBack;
                                }
                            }
                            objNode.Image = objAction.Icon;

                            if (objAction.HasChildren()) //if action has children then call function recursively
                            {
                                AddChildActions(objAction, objNode, objRootNode, objModule, objUserInfo, intDepth);
                            }
                        }
                    }
                }
            }
        }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:78,代码来源:Navigation.cs


示例13: ProcessNodes

 private void ProcessNodes(DNNNode objParent)
 {
     if (!String.IsNullOrEmpty(objParent.Image))
     {
     }
     else if (objParent.HasNodes) //imagepath applied in provider...
     {
         objParent.Image = ResolveUrl(NodeClosedImage);
     }
     else
     {
         objParent.Image = ResolveUrl(NodeLeafImage);
     }
     foreach (DNNNode objNode in objParent.DNNNodes)
     {
         ProcessNodes(objNode);
     }
 }
开发者ID:hackoose,项目名称:cfi-team05,代码行数:18,代码来源:TreeViewMenu.ascx.cs


示例14: GetNavigationNodes

        /// <summary>
        /// This function provides a central location to obtain a generic node collection of the pages/tabs included in
        /// the current context's (user) navigation hierarchy
        /// </summary>
        /// <param name="objRootNode">Node in which to add children to</param>
        /// <param name="eToolTips">Enumerator to determine what text to display in the tooltips</param>
        /// <param name="intStartTabId">If using Populate On Demand, then this is the tab id of the root element to retrieve (-1 for no POD)</param>
        /// <param name="intDepth">If Populate On Demand is enabled, then this parameter determines the number of nodes to retrieve beneath the starting tab passed in (intStartTabId) (-1 for no POD)</param>
        /// <param name="intNavNodeOptions">Bitwise integer containing values to determine what nodes to display (self, siblings, parent)</param>
        /// <returns>Collection of DNNNodes</returns>
        /// <remarks>
        /// Returns a subset of navigation nodes based off of passed in starting node id and depth
        /// </remarks>
        /// <history>
        /// 	[Jon Henning]	8/9/2005	Created
        /// </history>
        public static DNNNodeCollection GetNavigationNodes(DNNNode objRootNode, ToolTipSource eToolTips, int intStartTabId, int intDepth, int intNavNodeOptions)
        {
            int i;
            PortalSettings objPortalSettings = PortalController.GetCurrentPortalSettings();
            bool blnAdminMode = PortalSecurity.IsInRoles(objPortalSettings.AdministratorRoleName) | PortalSecurity.IsInRoles(objPortalSettings.ActiveTab.AdministratorRoles.ToString());
            //bool blnFoundStart = intStartTabId == -1; //if -1 then we want all

            Hashtable objBreadCrumbs = new Hashtable();
            Hashtable objTabLookup = new Hashtable();
            DNNNodeCollection objRootNodes = objRootNode.DNNNodes;
            int intLastBreadCrumbId = 0;
            TabInfo objTab;

            //--- cache breadcrumbs in hashtable so we can easily set flag on node denoting it as a breadcrumb node (without looping multiple times) ---'
            for (i = 0; i <= (objPortalSettings.ActiveTab.BreadCrumbs.Count - 1); i++)
            {
                objBreadCrumbs.Add(((TabInfo)(objPortalSettings.ActiveTab.BreadCrumbs[i])).TabID, 1);
                intLastBreadCrumbId = ((TabInfo)(objPortalSettings.ActiveTab.BreadCrumbs[i])).TabID;
            }

            for (i = 0; i < objPortalSettings.DesktopTabs.Count; i++)
            {
                objTab = (TabInfo)(objPortalSettings.DesktopTabs[i]);
                objTabLookup.Add(objTab.TabID, objTab);
            }

            for (i = 0; i < objPortalSettings.DesktopTabs.Count; i++)
            {
                try
                {
                    objTab = (TabInfo)(objPortalSettings.DesktopTabs[i]);

                    if (IsTabShown(objTab, blnAdminMode)) //based off of tab properties, is it shown
                    {
                        DNNNode objParentNode = objRootNodes.FindNode(objTab.ParentId.ToString());
                        bool blnParentFound = objParentNode != null;
                        if (objParentNode == null)
                        {
                            objParentNode = objRootNode;
                        }
                        DNNNodeCollection objParentNodes = objParentNode.DNNNodes;

                        //If objTab.ParentId = -1 OrElse ((intNavNodeOptions And NavNodeOptions.IncludeRootOnly) = 0) Then
                        if (objTab.TabID == intStartTabId)
                        {
                            //is this the starting tab
                            if ((intNavNodeOptions & (int)NavNodeOptions.IncludeParent) != 0)
                            {
                                //if we are including parent, make sure there is one, then add
                                if (objTabLookup[objTab.ParentId] != null)
                                {
                                    AddNode((TabInfo)(objTabLookup[objTab.ParentId]), objParentNodes, objBreadCrumbs, objPortalSettings, eToolTips);
                                    objParentNode = objRootNodes.FindNode(objTab.ParentId.ToString());
                                    objParentNodes = objParentNode.DNNNodes;
                                }
                            }
                            if ((intNavNodeOptions & (int)NavNodeOptions.IncludeSelf) != 0)
                            {
                                //if we are including our self (starting tab) then add
                                AddNode(objTab, objParentNodes, objBreadCrumbs, objPortalSettings, eToolTips);
                            }
                        }
                        else if (((intNavNodeOptions & (int)NavNodeOptions.IncludeSiblings) != 0) && IsTabSibling(objTab, intStartTabId, objTabLookup))
                        {
                            //is this a sibling of the starting node, and we are including siblings, then add it
                            AddNode(objTab, objParentNodes, objBreadCrumbs, objPortalSettings, eToolTips);
                        }
                        else
                        {
                            if (blnParentFound) //if tabs parent already in hierarchy (as is the case when we are sending down more than 1 level)
                            {
                                //parent will be found for siblings.  Check to see if we want them, if we don't make sure tab is not a sibling
                                if (((intNavNodeOptions & (int)NavNodeOptions.IncludeSiblings) != 0) || IsTabSibling(objTab, intStartTabId, objTabLookup) == false)
                                {
                                    //determine if tab should be included or marked as pending
                                    bool blnPOD = (intNavNodeOptions & (int)NavNodeOptions.MarkPendingNodes) != 0;
                                    if (IsTabPending(objTab, objParentNode, objRootNode, intDepth, objBreadCrumbs, intLastBreadCrumbId, blnPOD))
                                    {
                                        if (blnPOD)
                                        {
                                            objParentNode.HasNodes = true; //mark it as a pending node
                                        }
                                    }
                                    else
//.........这里部分代码省略.........
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:101,代码来源:Navigation.cs


示例15: GetActionNodes

 /// <summary>
 /// This function provides a central location to obtain a generic node collection of the actions associated 
 /// to a module based off of the current user's context
 /// </summary>
 /// <param name="objActionRoot">Root module action</param>
 /// <param name="objRootNode">Root node on which to populate children</param>
 /// <param name="objModule">Module whose actions you wish to obtain</param>
 /// <param name="intDepth">How many levels deep should be populated</param>
 /// <returns></returns>
 /// <remarks>
 /// </remarks>
 /// <history>
 /// 	[Jon Henning]	5/15/2006	Created
 /// </history>
 public static DNNNodeCollection GetActionNodes(ModuleAction objActionRoot, DNNNode objRootNode, ActionBase objModule, int intDepth)
 {
     DNNNodeCollection objCol = objRootNode.ParentNode.DNNNodes;
     AddChildActions(objActionRoot, objRootNode, objRootNode, objModule, UserController.GetCurrentUserInfo(), intDepth);
     return objCol;
 }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:20,代码来源:Navigation.cs


示例16: GetActionNodes

 /// -----------------------------------------------------------------------------
 /// <summary>
 /// This function provides a central location to obtain a generic node collection of the actions associated 
 /// to a module based off of the current user's context
 /// </summary>
 /// <param name="objActionRoot">Root module action</param>
 /// <param name="objRootNode">Root node on which to populate children</param>
 /// <param name="objControl">ActionControl to base actions off of</param>
 /// <param name="intDepth">How many levels deep should be populated</param>
 /// <returns></returns>
 /// <remarks>
 /// </remarks>
 /// <history>
 /// 	[Jon Henning]	5/15/2006	Created
 /// </history>
 /// -----------------------------------------------------------------------------
 public static DNNNodeCollection GetActionNodes(ModuleAction objActionRoot, DNNNode objRootNode, Control objControl, int intDepth)
 {
     DNNNodeCollection objCol = objRootNode.ParentNode.DNNNodes;
     var objActionControl = objControl as IActionControl;
     if (objActionControl != null)
     {
         AddChildActions(objActionRoot, objRootNode, objRootNode, objActionControl, intDepth);
     }
     return objCol;
 }
开发者ID:biganth,项目名称:Curt,代码行数:26,代码来源:Navigation.cs


示例17: RaiseEvent_PopulateOnDemand

 protected void RaiseEvent_PopulateOnDemand( DNNNode objNode )
 {
     if( PopulateOnDemandEvent != null )
     {
         PopulateOnDemandEvent( new NavigationEventArgs( objNode.ID, objNode ) );
     }
 }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:7,代码来源:NavigationProvider.ascx.cs


示例18: GetNavigationNodes

        /// -----------------------------------------------------------------------------
        /// <summary>
        /// This function provides a central location to obtain a generic node collection of the pages/tabs included in
        /// the current context's (user) navigation hierarchy
        /// </summary>
        /// <param name="objRootNode">Node in which to add children to</param>
        /// <param name="eToolTips">Enumerator to determine what text to display in the tooltips</param>
        /// <param name="intStartTabId">If using Populate On Demand, then this is the tab id of the root element to retrieve (-1 for no POD)</param>
        /// <param name="intDepth">If Populate On Demand is enabled, then this parameter determines the number of nodes to retrieve beneath the starting tab passed in (intStartTabId) (-1 for no POD)</param>
        /// <param name="intNavNodeOptions">Bitwise integer containing values to determine what nodes to display (self, siblings, parent)</param>
        /// <returns>Collection of DNNNodes</returns>
        /// <remarks>
        /// Returns a subset of navigation nodes based off of passed in starting node id and depth
        /// </remarks>
        /// <history>
        /// 	[Jon Henning]	8/9/2005	Created
        /// </history>
        /// -----------------------------------------------------------------------------
        public static DNNNodeCollection GetNavigationNodes(DNNNode objRootNode, ToolTipSource eToolTips, int intStartTabId, int intDepth, int intNavNodeOptions)
        {
            int i;
            PortalSettings objPortalSettings = PortalController.GetCurrentPortalSettings();
            bool blnFoundStart = intStartTabId == -1;

            var objBreadCrumbs = new Hashtable();
            var objTabLookup = new Hashtable();
            DNNNodeCollection objRootNodes = objRootNode.DNNNodes;
            int intLastBreadCrumbId = 0;

            //--- cache breadcrumbs in hashtable so we can easily set flag on node denoting it as a breadcrumb node (without looping multiple times) ---
            for (i = 0; i <= (objPortalSettings.ActiveTab.BreadCrumbs.Count - 1); i++)
            {
                objBreadCrumbs.Add(((TabInfo) objPortalSettings.ActiveTab.BreadCrumbs[i]).TabID, 1);
                intLastBreadCrumbId = ((TabInfo) objPortalSettings.ActiveTab.BreadCrumbs[i]).TabID;
            }
            var objTabController = new TabController();
            List<TabInfo> portalTabs = TabController.GetTabsBySortOrder(objPortalSettings.PortalId, objPortalSettings.CultureCode, true);
            List<TabInfo> hostTabs = TabController.GetTabsBySortOrder(Null.NullInteger, Localization.SystemLocale, true);
            foreach (TabInfo objTab in portalTabs)
            {
                objTabLookup.Add(objTab.TabID, objTab);
            }
            foreach (TabInfo objTab in hostTabs)
            {
                objTabLookup.Add(objTab.TabID, objTab);
            }
            foreach (TabInfo objTab in portalTabs)
            {
                try
                {
                    ProcessTab(objRootNode, objTab, objTabLookup, objBreadCrumbs, intLastBreadCrumbId, eToolTips, intStartTabId, intDepth, intNavNodeOptions);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            foreach (TabInfo objTab in hostTabs)
            {
                try
                {
                    ProcessTab(objRootNode, objTab, objTabLookup, objBreadCrumbs, intLastBreadCrumbId, eToolTips, intStartTabId, intDepth, intNavNodeOptions);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            return objRootNodes;
        }
开发者ID:biganth,项目名称:Curt,代码行数:70,代码来源:Navigation.cs


示例19: Add

 public int Add() // DNNNode
 {
     DNNNode objNode = new DNNNode();
     this.XMLNode.AppendChild( this.XMLDoc.ImportNode( objNode.XmlNode, false ) );
     objNode.ID = objNode.ParentNameSpace + "_" + Count;
     return this.XMLNode.ChildNodes.Count - 1; //Return objNode
 }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:7,代码来源:DNNNodeCollection.cs


示例20: RaiseEvent_NodeClick

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WebControls.PropertyEditorEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# Controls.ModuleMessage类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap