public void DisplayThemes() { List <Theme> themeList = ThemeGateway.GetThemesList(); this.ThemeView.ThemeListBox.ClearAllItems(); foreach (Theme theme in themeList) { this.ThemeView.ThemeListBox.AddDisplayTheme(new ThemeDTView(theme.ID, theme.Name)); } if (themeList.Count > 0) { this.ThemeView.ThemeListBox.SetSelectionAt(0); } }
private int GetSelectedThemeID() { List <Theme> themeList = ThemeGateway.GetThemesList(); string selectedTheme = Utility.Settings.UserSettings.Profile.ThemeSelected; int themeID = -1; for (int i = 0; i < themeList.Count; i++) { if (themeList[i].Name == selectedTheme) { themeID = themeList[i].ID; } } return(themeID); }