private static void SetWallpaper(Theme newTheme, RuntimeConfig rtc, List <string> darkThemeWallpapers, List <string> lightThemeWallpapers, bool enabled) { if (enabled) { if (newTheme == Theme.Dark) { var success = WallpaperHandler.SetBackground(darkThemeWallpapers); if (success) { rtc.CurrentWallpaperTheme = newTheme; rtc.CurrentWallpaperPath = WallpaperHandler.GetBackground(); } } else { var success = WallpaperHandler.SetBackground(lightThemeWallpapers); if (success) { rtc.CurrentWallpaperTheme = newTheme; rtc.CurrentWallpaperPath = WallpaperHandler.GetBackground(); } } } }
private static void SetWallpaper(Theme newTheme, GlobalState rtc, List <string> darkThemeWallpapers, List <string> lightThemeWallpapers, bool enabled) { if (enabled) { try { if (newTheme == Theme.Dark) { var success = WallpaperHandler.SetBackground(darkThemeWallpapers); if (success) { rtc.CurrentWallpaperTheme = newTheme; rtc.CurrentWallpaperPath = WallpaperHandler.GetBackground(); } } else { var success = WallpaperHandler.SetBackground(lightThemeWallpapers); if (success) { rtc.CurrentWallpaperTheme = newTheme; rtc.CurrentWallpaperPath = WallpaperHandler.GetBackground(); } } } catch (Exception ex) { Logger.Error(ex, "could not set wallpaper"); } } }
private static void SetWallpaper(Theme newTheme, RuntimeConfig rtc, System.Collections.Generic.ICollection <string> darkThemeWallpapers, System.Collections.Generic.ICollection <string> lightThemeWallpapers, bool enabled) { if (enabled) { if (newTheme == Theme.Dark) { var success = WallpaperHandler.SetBackground(darkThemeWallpapers); if (success) { rtc.CurrentWallpaperTheme = newTheme; } } else { WallpaperHandler.SetBackground(lightThemeWallpapers); rtc.CurrentWallpaperTheme = newTheme; } } }