Esempio n. 1
0
        static void Main(string[] args)
        {
            List <string> urls       = new List <string>();
            List <string> recipients = new List <string>();
            List <string> tags       = new List <string>();

            urls.Add("https://www.ibm.com/developerworks/views/global/rss/libraryview.jsp");
            recipients.Add("*****@*****.**");
            tags.Add("development");
            ControlClient controlClient = new ControlClient();

            Console.ReadLine();

            SynItems items = controlClient.ProcessFeeds(urls.ToArray(), tags.ToArray(), recipients.ToArray());

            Console.ReadLine();
        }
Esempio n. 2
0
 private void ReadFilterSendThreadMain()
 {
     if (ListBoxFeeds.Items.Count > 0)
     {
         tags.Clear();
         tags = TextBoxTags.Text.Split(' ').ToList();
         Links.Clear();
         ControlClient client = new ControlClient();
         SynItems      items  = client.ProcessFeeds(ListBoxFeeds.Items.Cast <string>().ToArray(), tags.ToArray(), ListBoxRecipients.Items.Cast <string>().ToArray());
         client.Close();
         ListBoxFeedItems.Invoke(new Action(() => ListBoxFeedItems.Items.Clear()));
         ListBoxFeedItems.Invoke(new Action(() => ListBoxFeedItems.Items.AddRange(items.Titles.ToArray())));
         Links.AddRange(items.Links);
         MainTimer.Stop();
         MainTimer.Interval = (double)(1000 * 60 * (NumericUpDownMinutes.Value + NumericUpDownHours.Value * 60 + NumericUpDownDays.Value * 60 * 24));
         MainTimer.Start();
         ActiveForm?.Invoke(new Action(() => ActiveForm.Text = "Mail sent at " + DateTime.Now));
     }
 }