Example #1
0
 private void PopulateItemUi(ItemUiScheme scheme)
 {
     foreach (var elem in scheme.Elements)
     {
         PopulateUiElement(elem);
     }
 }
Example #2
0
        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;
                    }
                }
            }
        }
Example #3
0
        public void DisplayScheme(ItemUiScheme scheme)
        {
            BeginUpdate();

            if (scheme != _CurrentScheme)
            {
                ShowThemeControls(scheme);
            }

            PopulateItemUi(scheme);

            EndUpdate();
        }