Exemplo n.º 1
0
        public Index(List<Feed> feeds)
        {
            InitializeComponent();

            Feeds = feeds;
            Indices = new List<SortableIndices>();

            RssReader rssReader = new RssReader();

            foreach (Feed feed in Feeds)
            {
                rssReader.UpdateFeedItems(feed);
            }
        }
Exemplo n.º 2
0
        private void Button_AddNewFeed_Click(object sender, RoutedEventArgs e)
        {
            RssReader rssReader = new RssReader();
            Feed feed = new Feed();

            try
            {
                feed = rssReader.ReadBasicFeed(TextBox_FeedUrl.Text);
                Feeds.Add(feed);
                rssReader.UpdateFeedItems(feed, true);
                MessageBox.Show("A new feed (" + feed.Title + ") was successfully added.");
                BuildFeedList();
            }
            catch (Exception exception){ DisplayErrorMessage(exception.Message); }
            finally { TextBox_FeedUrl.Clear(); }
        }
Exemplo n.º 3
0
        private void UpdateFeedItems()
        {
            RssReader rssReader = new RssReader();

            foreach (Feed feed in Feeds)
            {
                rssReader.UpdateFeedItems(feed);
            }

            BuildFeedItemList();
        }