private WallpaperUpdater InitializeWallpaperUpdater() { var wallpaperUpdater = new WallpaperUpdater(); wallpaperUpdater.Update(selectedRssFeed); return(wallpaperUpdater); }
public ApplicationConfig() { rssFeeds = ReadRssFeedsFromFileOnDisk(); selectedRssFeed = SelectFirstRssFeedAsDefault(); trayIcon = InitializeTrayIcon(); intervalTimer = InitializeIntervalTimer(); SetApplicationExitEventHandler(); wallpaperUpdater = InitializeWallpaperUpdater(); }
private static void Main(string[] args) { try { WriteLine("Begin"); var wallpaperUpdater = new WallpaperUpdater(); var rssUrl = ConfigurationManager.AppSettings["rssUrl"]; wallpaperUpdater.Update(new RssFeed("Default feed", rssUrl)); } catch (Exception ex) { WriteLine(ex); EventLog.WriteEntry("Application", $"WallpaperUpdater failed: {ex}", EventLogEntryType.Information); } finally { WriteLine("End"); } }