private void PopulateItemUi(ItemUiScheme scheme) { foreach (var elem in scheme.Elements) { PopulateUiElement(elem); } }
private void ShowThemeControls(ItemUiScheme scheme) { foreach (ToolStripItem c in Controls.Values) { c.Visible = false; foreach (var subcontrol in GroupedControls[c]) { subcontrol.Visible = false; } } _CurrentScheme = scheme; foreach (var schemeElement in scheme.Elements) { ToolStripItem control; if (Controls.TryGetValue(schemeElement.Role, out control)) { control.Visible = true; foreach (var subcontrol in GroupedControls[control]) { subcontrol.Visible = true; } } } }
public void DisplayScheme(ItemUiScheme scheme) { BeginUpdate(); if (scheme != _CurrentScheme) { ShowThemeControls(scheme); } PopulateItemUi(scheme); EndUpdate(); }