public static void SetTheme(string theme) { var t = Themes.FirstOrDefault(x => x.Name.ToLowerInvariant() == theme.ToLowerInvariant()); if(t == null) return; CurrentTheme = t; UpdateCards(); }
public static void Run() { var dirs = Directory.GetDirectories(ThemeDir); foreach(var d in dirs) { var di = new DirectoryInfo(d); if(Regex.IsMatch(di.Name, ThemeRegex)) { Themes.Add( new Theme( di.Name, di.FullName, GetBuilderType(di.Name))); } else { Logging.Log.Warn($"Invalid theme directory name {di.Name}"); } } CurrentTheme = FindTheme(Config.Instance.CardBarTheme) ?? Themes.FirstOrDefault(); }
public static void Run() { LoadThemes(CustomThemeDir); LoadThemes(ThemeDir); CurrentTheme = FindTheme(Config.Instance.CardBarTheme) ?? Themes.FirstOrDefault(); }