ScrewTurn.Wiki.AdminConfig.PopulateThemes C# (CSharp) Method

PopulateThemes() private method

Populates the Themes list selecting the current one.
private PopulateThemes ( string current ) : void
current string The current theme.
return void
        private void PopulateThemes(string current)
        {
            current = current.ToLowerInvariant();

            string[] themes = Tools.AvailableThemes;
            lstRootTheme.Items.Clear();
            foreach(string theme in themes) {
                lstRootTheme.Items.Add(new ListItem(theme, theme));
                if(theme.ToLowerInvariant() == current) lstRootTheme.Items[lstRootTheme.Items.Count - 1].Selected = true;
            }
        }