ComponentFactory.Krypton.Toolkit.MenuCheckBoxController.UpdateTarget C# (CSharp) Метод

UpdateTarget() приватный Метод

private UpdateTarget ( ) : void
Результат void
        private void UpdateTarget()
        {
            // Find new state for drawing the check box
            PaletteState state = (_menuCheckBox.ItemEnabled ? PaletteState.Normal : PaletteState.Disabled);
            if (_mouseOver)
            {
                if (_mouseDown)
                    state = PaletteState.Pressed;
                else
                    state = PaletteState.Tracking;
            }

            switch (state)
            {
                case PaletteState.Normal:
                    _menuCheckBox.ViewDrawCheckBox.Tracking = false;
                    _menuCheckBox.ViewDrawCheckBox.Pressed = false;
                    break;
                case PaletteState.Tracking:
                    _menuCheckBox.ViewDrawCheckBox.Tracking = true;
                    _menuCheckBox.ViewDrawCheckBox.Pressed = false;
                    break;
                case PaletteState.Pressed:
                    _menuCheckBox.ViewDrawCheckBox.Tracking = false;
                    _menuCheckBox.ViewDrawCheckBox.Pressed = true;
                    break;
            }

            bool applyFocus = (_highlight && !_mouseReallyOver);
            _menuCheckBox.KryptonContextMenuCheckBox.OverrideNormal.Apply = applyFocus;
            _menuCheckBox.KryptonContextMenuCheckBox.OverrideDisabled.Apply = applyFocus;
            _menuCheckBox.ViewDrawContent.ElementState = state;
            PerformNeedPaint();
        }