コード例 #1
0
        public NavigationItemCollection GetChildItems(int id)
        {
            NavigationItemCollection items = new NavigationItemCollection();

            foreach (NavigationItem item in Navigations)
            {
                if (item.ParentID == id)
                {
                    items.Add(item);
                }
            }

            return(items);
        }
コード例 #2
0
ファイル: TopLinkSettings2.cs プロジェクト: zhangbo27/bbsmax
        public TopLinkSettings2()
        {
            Navigations = new NavigationItemCollection();

            MaxID = 0;

            MaxID++;
            NavigationItem item = new NavigationItem();

            item.ID              = MaxID;
            item.Name            = "首页";
            item.UrlInfo         = "index";
            item.NewWindow       = false;
            item.OnlyLoginCanSee = false;
            item.SortOrder       = MaxID;
            item.Type            = MaxLabs.bbsMax.Enums.NavigationType.Internal;
            item.IsTopLink       = true;

            Navigations.Add(item);
        }
コード例 #3
0
        public NavigationSettings()
        {
            Navigations = new NavigationItemCollection();

            MaxID = 0;
            //foreach (KeyValuePair<string, string> pair in NavigationSettings.InternalLinks())
            //{
            //    if (pair.Key == "index")
            //    {
            MaxID++;
            NavigationItem item = new NavigationItem();

            item.ID              = MaxID;
            item.Name            = "首页";
            item.UrlInfo         = "index";
            item.NewWindow       = false;
            item.OnlyLoginCanSee = false;
            item.SortOrder       = MaxID;
            item.Type            = MaxLabs.bbsMax.Enums.NavigationType.Internal;

            Navigations.Add(item);
            //    }
            //}
        }