private void RssTreeView_AfterSelect(object sender, TreeViewEventArgs e) { string url = (string)RssTreeView.SelectedNode.Tag; feed = new RssFeed(url); items = feed.MainChannel.Items; RssListView.Items.Clear(); foreach (RssItem item in items) { string[] subItems = new string[3]; subItems[0] = item.Title; subItems[1] = item.Description; subItems[2] = item.Link; ListViewItem lvi = new ListViewItem(subItems); RssListView.Items.Add(lvi); } }
private void 新增频道ToolStripMenuItem_Click(object sender, EventArgs e) { AddFeed addFeed = new AddFeed(); addFeed.ShowDialog(); string url = addFeed.Url; if (url != string.Empty) { RssFeed newFeed = new RssFeed(url); RssLinkXML rssLinkXML = new RssLinkXML(); rssLinkXML.AddLink(newFeed.MainChannel.Title, url); ShowDefaultItems(); } }