Example #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            XDocument xdoc = XDocument.Load("weatherdata.xml");

            proc = new XMLProcessor(xdoc);
            Task.Run(() => CheckXMLForUpdate());
        }
Example #2
0
 private void CheckXMLForUpdate()
 {
     while (true)
     {
         xdoc           = XDocument.Load("weatherdata.xml");
         proc           = new XMLProcessor(xdoc);
         regionDataList = proc.GetRegionData();
         Dispatcher.Invoke(() => listbox.ItemsSource = regionDataList);
         Thread.Sleep(1000);
     }
 }