protected virtual void OnPianoKeyUp(PianoKeyEventArgs e) { EventHandler<PianoKeyEventArgs> handler = PianoKeyUp; if(handler != null) { handler(this, e); } }
private void pianoControl1_PianoKeyUp(object sender, PianoKeyEventArgs e) { #region Guard if (playing) { return; } #endregion outDevice.Send(new ChannelMessage(ChannelCommand.NoteOff, 0, e.NoteID, 0)); }
protected virtual void OnPianoKeyDown(PianoKeyEventArgs e) { PianoKeyDown?.Invoke(this, e); }