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;
        }
 void DeleteSelectedFeed()
 {
     if (CurrentItem == null)
     {
         return;
     }
     mainNavBar.Items.Remove(CurrentItem);
     UpdateSelectedLinkData();
     NavBarHelper.DeleteEmptyGroup(mainNavBar);
 }
 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();
         }
     }
 }
 void UpdateSelectedLinkData()
 {
     if (CurrentItem == null)
     {
         mainNavBar.SelectedLink = NavBarHelper.GetFirstItem(mainNavBar);
     }
     if (mainNavBar.SelectedLink != null)
     {
         Cursor.Current = Cursors.WaitCursor;
         partName       = mainNavBar.SelectedLink.Item.Caption;
         LoadFeedToGrid(GetCurrentFeed());
         Cursor.Current = Cursors.Default;
     }
     else
     {
         partName = string.Empty;
     }
     UpdateButtons();
     // UpdateCurrentRecord();
 }
        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();
            }
        }