public void InvokeUpKeyPressedEvent() { UpKeyPressed?.Invoke(); }
private void OnKeyPressed(object sender, KeyboardEventArgs e) { KeyPressed?.Invoke(this, e); switch (e.Key) { case Keys.Enter: EnterKeyPressed?.Invoke(this, new EventArgs()); break; case Keys.Left: LeftKeyPressed?.Invoke(this, new EventArgs()); break; case Keys.Right: RightKeyPressed?.Invoke(this, new EventArgs()); break; case Keys.Up: UpKeyPressed?.Invoke(this, new EventArgs()); break; case Keys.Down: DownKeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D0: D0KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D1: D1KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D2: D2KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D3: D3KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D4: D4KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D5: D5KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D6: D6KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D7: D7KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D8: D8KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D9: D9KeyPressed?.Invoke(this, new EventArgs()); break; case Keys.D: DKeyPressed?.Invoke(this, new EventArgs()); break; case Keys.E: EKeyPressed?.Invoke(this, new EventArgs()); break; case Keys.C: CKeyPressed?.Invoke(this, new EventArgs()); break; case Keys.U: UKeyPressed?.Invoke(this, new EventArgs()); break; case Keys.I: IKeyPressed?.Invoke(this, new EventArgs()); break; default: return; } }