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); }
private void ClickImportImages(object sender, RoutedEventArgs e) { PathHandling.ImportFiles(); Scroll.Content = null; Scroll.Content = ImageCacheLoader.LoadImages(); }