protected void OnKeyDown(KeyDownEventArg arg) { if (RaiseKeyDown != null) { RaiseKeyDown(this, arg); } }
private void IPianoKeyController_RaiseKeyDown(object sender, KeyDownEventArg e) { IPianoKeyController pkc = e.pianoKeyCtrl; if (pkc == this.currentPianoKey) { IPianoKeyController previous = this.currentPianoKey; int temp = GetKeyIndex(); this.currentPianoKey = this.pianoKeys[temp]; this.warmUp.SetNewKey(previous, this.currentPianoKey); } }