protected override void UpdateSetting() { ThemeConfigSetting themeSetting = (ThemeConfigSetting)_setting; themeSetting.CurrentThemeName = ChoosenItemName; base.UpdateSetting(); }
protected override void SettingChanged() { _items.Clear(); ThemeConfigSetting themeSetting = (ThemeConfigSetting)_setting; foreach (Theme theme in themeSetting.Themes) { ListItem themeItem = new ListItem(KEY_NAME, theme.ShortDescription); themeItem.SetLabel(KEY_TECHNAME, theme.Name); ISkinResourceBundle resourceBundle; string preview = theme.GetResourceFilePath(theme.PreviewResourceKey, false, out resourceBundle); themeItem.SetLabel(KEY_IMAGESRC, preview); _items.Add(themeItem); if (themeSetting.CurrentThemeName == theme.Name) { themeItem.Selected = true; _choosenItem = themeItem; } } _items.FireChange(); base.SettingChanged(); }