private void PbScreen_MouseClick_LFOArea(int px, int py, MouseEventArgs e) { if (py == 2 || e.Button != MouseButtons.Left) { return; } KbdParam target = KbdParam.Unknown; int n = py - 3; if (px >= 0 && px <= 2) { target = KbdParam.Lfo; } else if (px >= 4 && px <= 6) { target = KbdParam.LfoUse; } else if (px == 8) { target = KbdParam.LfoType; } else if (px >= 11 && px <= 13) { target = KbdParam.LfoDelay; } else if (px >= 16 && px <= 18) { target = KbdParam.LfoSpeed; } else if (px >= 20 && px <= 25) { target = KbdParam.LfoDelta; } else if (px >= 27 && px <= 32) { target = KbdParam.LfoDepth; } else if (px >= 34 && px <= 36) { target = KbdParam.LfoWaveType; } else if (px == 39) { target = KbdParam.LfoSw; } else if (px >= 41 && px <= 46) { target = KbdParam.LfoTrans; } if (frmMIDIKbd_prm == null || frmMIDIKbd_prm.IsDisposed) { frmMIDIKbd_prm = new FrmMIDIKbd_prm(setting); frmMIDIKbd_prm.Target = target; frmMIDIKbd_prm.TargetTab = n + 1; frmMIDIKbd_prm.Show(); } }
private void PbScreen_MouseClick_ParamArea(int px, int py, MouseEventArgs e) { if (e.Button != MouseButtons.Left) { return; } KbdParam target = KbdParam.Unknown; if (px >= 7 && px <= 9) { target = KbdParam.CurrentChannel; } else if (px >= 15 && px <= 16) { target = KbdParam.Octave; } else if (px >= 24 && px <= 26) { target = KbdParam.Tempo; } else if (px >= 32 && px <= 34) { target = KbdParam.ClockCounter; } else if (px >= 38 && px <= 40) { target = KbdParam.NoteLength; } else if (px >= 44 && px <= 46) { target = KbdParam.Quantize; } if (frmMIDIKbd_prm == null || frmMIDIKbd_prm.IsDisposed) { frmMIDIKbd_prm = new FrmMIDIKbd_prm(setting); frmMIDIKbd_prm.Target = target; frmMIDIKbd_prm.TargetTab = 0; frmMIDIKbd_prm.Show(); } }