예제 #1
0
        public static void StartImageCycling(WeatherHandler weather)
        {
            weatherHandler = weather;
            Thread updatingThread = new Thread(new ThreadStart(ThreadRun));

            updatingThread.Start();
        }
예제 #2
0
        private void InitializeApp()
        {
            Scroll.Content = ImageCacheLoader.LoadImages();

            SettingsLoader.LoadSettingsFromDisk();
            PersistentData currentData = SettingsLoader.GetCurrentSettingsData();

            DisplaySettings(currentData);

            //weather data
            weatherHandler = new WeatherHandler(currentData.openWeatherMapAPIKey, currentData.plz);
            DispatcherTimer LiveTime = new DispatcherTimer();

            UpdateDataPeriodic(this, null); //show immediatly after application start, then start thread
            LiveTime.Interval = TimeSpan.FromSeconds(30);
            LiveTime.Tick    += UpdateDataPeriodic;
            LiveTime.Start();

            FillComboboxes();

            ImageChanger.StartImageCycling(weatherHandler);
        }