예제 #1
0
        public static Theme GetThemeOrDefault(string name)
        {
            var theme = themes[name] ?? themes[DefaultThemeName] ?? AllThemesSorted.FirstOrDefault();

            Debug.Assert(theme != null);
            return(theme);
        }
예제 #2
0
        ITheme GetThemeOrDefault(Guid guid)
        {
            Theme theme;

            if (themes.TryGetValue(guid, out theme))
            {
                return(theme);
            }
            if (themes.TryGetValue(DefaultThemeGuid, out theme))
            {
                return(theme);
            }
            return(AllThemesSorted.FirstOrDefault());
        }