示例#1
0
文件: RssForm.cs 项目: Cothn/SPP
        private void timerMailingTimer_Tick(object sender, EventArgs e)
        {
            if (configs.sources.Count != 0)
            {
                IRssFeedService service = currService;

                try
                {
                    var feed = service.LoadFeed(configs.sources);

                    if (configs.tags.Count != 0)
                    {
                        feed = service.FilterFeed(feed, configs.tags);
                    }

                    if ((!String.IsNullOrEmpty(configs.senderEmail)) && (!String.IsNullOrEmpty(configs.senderPassword)) && (feed.Count != 0) && (configs.recepients.Count != 0))
                    {
                        service.SendFeedByEmail(configs.senderEmail, configs.senderPassword, feed, configs.recepients);
                    }
                }
                catch (RssServiceException)
                {
                    MessageBox.Show("Error occured. Check your internet connection");
                }
            }
        }
示例#2
0
文件: RssForm.cs 项目: Cothn/SPP
        private void buttonUpdateFeed_Click(object sender, EventArgs e)
        {
            if (configs.sources.Count != 0)
            {
                IRssFeedService service = currService;


                try
                {
                    RssFeedItems = service.LoadFeed(configs.sources);

                    if (configs.tags.Count != 0)
                    {
                        RssFeedItems = service.FilterFeed(RssFeedItems, configs.tags);
                    }

                    UpdateFeedTitleList();
                }
                catch (RssServiceException)
                {
                    MessageBox.Show("Error occured. Check your internet connection");
                }
            }
        }