Ejemplo n.º 1
0
        public static void AdjustTopNavigator(TopNavigationPanel topNavPanel, PersonalPart part, Guid currentItem)
        {
            topNavPanel.DisableProductNavigation = true;
            topNavPanel.DisableSearch = true;
            topNavPanel.DisableUserInfo = true;

            topNavPanel.DisableSearch = true;
            topNavPanel.CustomTitle = Resources.Resource.Administration;
            topNavPanel.CustomTitleURL = GetPartUrl(PersonalPart.Default);
            topNavPanel.CustomTitleIconURL = WebImageSupplier.GetAbsoluteWebPath("settings.png");

            int i=0;
            //items
            foreach(var itemId in _personalItems)
            {
                var webItem = WebItemManager.Instance[itemId];                 
                topNavPanel.NavigationItems.Add(new NavigationItem()
                {
                    Name = webItem.Name,
                    URL = VirtualPathUtility.ToAbsolute(webItem.StartURL),
                    Selected = currentItem.Equals(webItem.ID) || (part == PersonalPart.Default && i==0)
                });

                i++;
            }            

            //backup
            topNavPanel.NavigationItems.Add(new NavigationItem()
            {
                Name = Resources.Resource.Backup,
                URL = GetPartUrl(PersonalPart.Backup),
                Selected = (part == PersonalPart.Backup),
                RightAlign = true
            });

            //settings
            topNavPanel.NavigationItems.Add(new NavigationItem()
            {
                Name = Resources.Resource.Administration,
                URL = GetPartUrl(PersonalPart.Settings),
                Selected = (part == PersonalPart.Settings),
                RightAlign = true
            });

            //profile
            topNavPanel.NavigationItems.Add(new NavigationItem()
            {
                Name = Resources.Resource.Profile,
                URL = GetPartUrl(PersonalPart.Profile),
                Selected = (part == PersonalPart.Profile),
                RightAlign = true
            });
          
        }
Ejemplo n.º 2
0
 public static void AdjustTopNavigator(TopNavigationPanel topNavPanel, PersonalPart part)
 {
     AdjustTopNavigator(topNavPanel, part, Guid.Empty);
 }
Ejemplo n.º 3
0
 protected override void OnInit(EventArgs e)
 {
     base.OnInit(e);
     TopNavigationPanel = (TopNavigationPanel) LoadControl(TopNavigationPanel.Location);
 }