Exemplo n.º 1
0
Arquivo: RssForm.cs Projeto: 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");
                }
            }
        }
Exemplo n.º 2
0
Arquivo: RssForm.cs Projeto: 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");
                }
            }
        }