Пример #1
0
        public void getAllFeeds()
        {
            intervalUpdate inter = new intervalUpdate();

            string name;
            string url;
            string interval;

            XElement doc = XElement.Load("Tushar.xml");

            IEnumerable<XElement> feeds =
                from ele in doc.Descendants("titleFeed")
                select ele;

            foreach (XElement el in feeds)
            {
                name = el.Attributes("name").Single().Value.ToString();
                url = el.Attributes("url").Single().Value.ToString();
                interval = el.Attributes("interval").Single().Value.ToString();

                inter.url = url;
                inter.title = name;
                inter.createTimer(Int32.Parse(interval));

            }
        }
Пример #2
0
 //Testmetod för att starta interval
 //Fungerar men enbart för en viss pod
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     try
     {
         intervalUpdate inter = new intervalUpdate();
         inter.url = tbURL.Text;
         inter.title = "Alex och Sigge";
         inter.createTimer(10);
     }
     catch (Exception er)
     {
         string error = er.Message;
         Console.WriteLine(error);
     }
 }