コード例 #1
0
        public static string[] GetDefaultThemes()
        {
            CustomConfigSection section       = (CustomConfigSection)ConfigurationManager.GetSection("customConfig");
            List <string>       defaultThemes = new List <string>();

            foreach (ThemeElement elem in section.DefaultThemes)
            {
                defaultThemes.Add(elem.Id);
            }

            return(defaultThemes.ToArray());
        }
コード例 #2
0
        public static Uri[] GetThemeUriList(string themeId)
        {
            CustomConfigSection section = (CustomConfigSection)ConfigurationManager.GetSection("customConfig");

            foreach (ThemeElement elem in section.DefaultThemes)
            {
                if (elem.Id == themeId)
                {
                    return(elem.UriList.Select(uri => new Uri(uri)).ToArray());
                }
            }

            return(new Uri[0]);
        }