public override void OnKeyDown(KeyEventArgs keyEvent) { if (keyEvent.KeyCode == Keys.Space) { m_status = !m_status; keyEvent.Handled = true; } }
public override void OnKeyDown(KeyEventArgs keyEvent) { double d = 0.005; if (m_num_steps != 0) { d = 1.0 / m_num_steps; } if (keyEvent.KeyCode == Keys.Right || keyEvent.KeyCode == Keys.Up) { m_preview_value += d; if (m_preview_value > 1.0) m_preview_value = 1.0; NormalizeValue(true); keyEvent.Handled = true; } if (keyEvent.KeyCode == Keys.Left || keyEvent.KeyCode == Keys.Down) { m_preview_value -= d; if (m_preview_value < 0.0) m_preview_value = 0.0; NormalizeValue(true); keyEvent.Handled = true; } }
public virtual void OnKeyDown(KeyEventArgs keyEvent) { UIWidget childWithFocus = GetChildContainingFocus(); if (childWithFocus != null && childWithFocus.Visible) { childWithFocus.OnKeyDown(keyEvent); } if (!keyEvent.Handled && keyEvent.KeyCode == Keys.Tab) { if (keyEvent.Shift) { FocusPrevious(); } else { FocusNext(); } } }
public virtual void OnKeyUp(KeyEventArgs keyEvent) { UIWidget childWithFocus = GetChildContainingFocus(); if (childWithFocus != null && childWithFocus.Visible) { childWithFocus.OnKeyUp(keyEvent); } }
public override void OnKeyDown(KeyEventArgs keyEvent) { if (keyEvent.KeyCode == Keys.Space) { if (ButtonClick != null) { ButtonClick(this); } keyEvent.Handled = true; } }