public void InitializeView(ViewState state) { State = state; lblHeader.Text = state.HeaderText; lblHeader.Visible = state.ListSettings.ShowHeader; tipDescription.SetToolTip(lblHeader, this.State.Description); tipDescription.SetToolTip(pnlDetail, this.State.Description); InitializeGridRows(state.ListSettings); _theme = UserThemeRepository.GetThemeOrDefault(State.ThemeId); ApplyTheme(_theme); }
private void cboThemes_SelectedIndexChanged(object sender, EventArgs e) { try { if (chkApplyTheme.Checked && cboThemes.SelectedValue != null) { var theme = UserThemeRepository.GetThemeOrDefault((Guid)cboThemes.SelectedValue); if (theme != null) { ApplyTheme(theme); } } } catch (Exception ex) { ExceptionHandler("Error selecting theme", ex); } }
private void chkApplyTheme_CheckedChanged(object sender, EventArgs e) { try { if (chkApplyTheme.Checked) { var theme = UserThemeRepository.GetThemeOrDefault((Guid)cboThemes.SelectedValue); ApplyTheme(theme); } else { ApplyTheme(_blankTheme); } } catch (Exception ex) { ExceptionHandler("Error applying theme", ex); } }