public void UpdateUIPreferences() { autoTableCheckbox.Checked = S.Get("AutocompleteInsertTables", false); autoAliasCheckbox.Checked = S.Get("AutocompleteInsertAliases", false); BackColor = UI.headerBackColor; ForeColor = UI.headerForeColor; foreach (Control c in buttons) { ToolButton b = c as ToolButton; if (b != null) { b.SetUIPreferences(BackColor, UI.buttonHoverColor, UI.smallButtonImages); } ToolCheckBox cb = c as ToolCheckBox; if (cb != null) { cb.SetUIPreferences(BackColor, UI.buttonHoverColor, UI.buttonCheckedColor, UI.smallButtonImages); } } // foreach (EditorHeaderDropdown combo in dropdowns) Invalidate(true); }
void SetButtonUiPreferences(List <Control> list) { foreach (Control c in list) { ToolCheckBox cb = c as ToolCheckBox; if (cb != null) { cb.SetUIPreferences(header.BackColor, UI.buttonHoverColor, UI.buttonCheckedColor, buttonImages); } else { ToolButton b = c as ToolButton; if (b != null) { b.SetUIPreferences(header.BackColor, UI.buttonHoverColor, buttonImages); } } } }