private static void Loadthemes(string inputUrl) { JabberPoint.Data.theme data; ThemeXmlLoader loader = new ThemeXmlLoader(inputUrl); data = loader.RootObject; var themes = Themes.GetSingleton(); var theme = new JabberPoint.Domain.Themes.ThemeCollection(); theme.Name = inputUrl; foreach (var filter in data.themefilters) { if (string.Compare(filter.@for, "default", true) == 0) { theme.PageThemes.Add(-1, SetPageTheme(filter, data.styles)); } else { foreach (var page in [email protected](',')) { theme.PageThemes.Add(int.Parse(page), SetPageTheme(filter, data.styles)); } } } themes.SetList(new List <ThemeCollection>() { theme }); themes.SetCurrentTheme(theme.Name); }
private static void addTheme(JabberPoint.Data.theme data, string inputUrl) { var theme = new JabberPoint.Domain.Themes.ThemeCollection { Name = inputUrl }; foreach (var filter in data.themefilters) { if (string.Compare(filter.@for, "default", true) == 0) { theme.PageThemes.Add(-1, SetPageTheme(filter, data.styles)); } else { foreach (var page in [email protected](',')) { theme.PageThemes.Add(int.Parse(page), SetPageTheme(filter, data.styles)); } } } }