void SettingView_OnOKclick(ThemeDTView themeDT, int range, int step, string skin, string language) { try { string theme = themeDT == null ? string.Empty : themeDT.Name; Utility.Settings.UserSettings.Profile.ThemeSelected = theme; Utility.Settings.UserSettings.Profile.Range = range; Utility.Settings.UserSettings.Profile.Step = step; Utility.Settings.UserSettings.Profile.Appearance = skin; Utility.Settings.UserSettings.Profile.Language = language; Utility.Settings.Save(); } catch (Exception ex) { this.HandleException("Could not to save settings", ex); } }
void ThemeView_OnSaveTheme(ThemeDTView themeDT) { try { Theme theme = new Theme(themeDT.ID, themeDT.Name); if (theme.ID == 0) { themeDT.ID = ThemeGateway.AddTheme(theme); this.ThemeView.ThemeListBox.InsertTheme(0, themeDT); this.ThemeView.ThemeListBox.SetSelectionAt(0); this.ThemeView.DisplayLexim(new LeximDTView(0, this.ThemeView.ThemeListBox.SelectedTheme.ID, string.Empty, null, null), this.ThemeView.Play); } else { ThemeGateway.UpdateTheme(new Theme(themeDT.ID, themeDT.Name)); this.ThemeView.ThemeListBox.UpdateTheme(themeDT); } } catch (Exception ex) { this.HandleException("Could not add or update theme ", ex); } }
private void ThemeView_OnThemeSelectionChanged(ThemeDTView themeDT) { this.ThemeView.DisplayTheme(themeDT); DisplayLexims(themeDT.ID); }