public FormWrapper() { Application.ApplicationExit += new EventHandler(OnApplicationExit); EnforceSingleInstance(); JsonConfig.LoadConfig(); _wcsService = new WallpaperChangeScheduler(); InitializeComponent(); _startupManager = UwpDesktop.GetStartupManager(notifyIcon.ContextMenu.MenuItems[6]); if (!Directory.Exists("images")) { DownloadImages(); } else { TryStartScheduler(); } }
public AppContext() { EnforceSingleInstance(); JsonConfig.LoadConfig(); InitializeComponent(); _startupManager = UwpDesktop.GetStartupManager(notifyIcon.ContextMenu.MenuItems[6]); _wcsService = new WallpaperChangeScheduler(); if (!Directory.Exists("images")) { DownloadImages(); } else if (JsonConfig.settings.location == null) { UpdateLocation(); } else { _wcsService.RunScheduler(); } }
public FormWrapper() { Application.ApplicationExit += new EventHandler(OnApplicationExit); SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(OnPowerModeChanged); JsonConfig.LoadConfig(); _wcsService = new WallpaperChangeScheduler(); InitializeComponent(); _startupManager = new StartupManager(notifyIcon.ContextMenu.MenuItems[5]); if (!Directory.Exists("images")) { DownloadImages(); } else if (JsonConfig.firstRun) { UpdateLocation(); } else { _wcsService.StartScheduler(); } }