ComponentFactory.Krypton.Toolkit.CheckBoxController.KeyDown C# (CSharp) Method

KeyDown() public method

Key has been pressed down.
public KeyDown ( Control c, KeyEventArgs e ) : void
c System.Windows.Forms.Control Reference to the source control instance.
e System.Windows.Forms.KeyEventArgs A KeyEventArgs that contains the event data.
return void
        public virtual void KeyDown(Control c, KeyEventArgs e)
        {
            Debug.Assert(c != null);
            Debug.Assert(e != null);

            // Validate incoming references
            if (c == null) throw new ArgumentNullException("c");
            if (e == null) throw new ArgumentNullException("e");

            if (e.KeyCode == Keys.Space)
            {
                // Enter the captured mode and pretend mouse is over area
                if (Enabled)
                {
                    _captured = true;
                    _target.Pressed = true;
                    PerformNeedPaint();
                }
            }
        }