Esempio n. 1
0
        void AddNavBarItem(string name, string groupName, string link, NavBarControl navBar)
        {
            NavBarGroup group = NavBarHelper.GetGroupByName(groupName, navBar);
            NavBarItem  item  = new NavBarItem(name);

            NavBarHelper.SetNavBarItemImage(item, link);
            group.ItemLinks.Add(item);
            group.Expanded = true;
            item.Tag       = link;
        }
Esempio n. 2
0
 void AddNewFeedInfo()
 {
     using (frmFeed frm = new frmFeed(DialogRole.New, mainNavBar)) {
         if (frm.ShowDialog(OwnerForm) == DialogResult.OK)
         {
             if (CurrentItem == null)
             {
                 return;
             }
             FetchedFeeds.Remove(CurrentItem.Caption);
             NavBarHelper.SetNavBarItemImage(CurrentItem, CurrentUrl);
             UpdateSelectedLinkData();
         }
     }
 }
Esempio n. 3
0
        void EditCurrentFeedInfo()
        {
            if (CurrentItem == null)
            {
                return;
            }
            frmFeed frm = new frmFeed(DialogRole.Edit, mainNavBar);
            string  key = CurrentItem.Caption;
            string  url = CurrentUrl;

            if (frm.ShowDialog(OwnerForm) == DialogResult.OK)
            {
                if (url != CurrentUrl || key != CurrentItem.Caption)
                {
                    FetchedFeeds.Remove(key);
                }
                NavBarHelper.SetNavBarItemImage(CurrentItem, CurrentUrl);
                UpdateSelectedLinkData();
            }
        }