private void setEditMode(object item) { tsmEditModeNote.Checked = false; tsmEditModeInst.Checked = false; tsmEditModeVol.Checked = false; tsmEditModeExp.Checked = false; tsmEditModePan.Checked = false; tsmEditModePitch.Checked = false; tsmEditModeVib.Checked = false; tsmEditModeVibDep.Checked = false; tsmEditModeVibRate.Checked = false; tsmEditModeRev.Checked = false; tsmEditModeDel.Checked = false; tsmEditModeDelDep.Checked = false; tsmEditModeDelTime.Checked = false; tsmEditModeCho.Checked = false; tsmEditModeFc.Checked = false; tsmEditModeFq.Checked = false; tsmEditModeAttack.Checked = false; tsmEditModeRelease.Checked = false; tsmEditModeTempo.Checked = false; var obj = (ToolStripMenuItem)item; obj.Checked = true; tsdEditMode.Image = obj.Image; tsdEditMode.ToolTipText = string.Format("入力種別({0})", obj.Text); tsmEditModeVib.Checked = tsmEditModeVibDep.Checked | tsmEditModeVibRate.Checked; tsmEditModeDel.Checked = tsmEditModeDelDep.Checked | tsmEditModeDelTime.Checked; mSelectState = E_SELECT.NONE; }
private void picRoll_MouseUp(object sender, MouseEventArgs e) { switch (e.Button) { case MouseButtons.Right: break; case MouseButtons.Left: if (mTimeEnd < mTimeBegin) { var tmp = mTimeEnd; mTimeEnd = mTimeBegin; if (tsbWrite.Checked) { mTimeEnd += mTimeSnap; } mTimeBegin = tmp; } else { mTimeEnd += mTimeSnap; } if (mToneEnd < mToneBegin) { var tmp = mToneEnd; mToneEnd = mToneBegin; mToneBegin = tmp; } if (tsbWrite.Checked && tsmEditModeNote.Checked) { addNoteEvent(); putDrawEvents(); } if (tsbSelect.Checked) { mSelectState = E_SELECT.SELECT_AREA; } else { mSelectState = E_SELECT.NONE; } break; } }
private void picRoll_MouseDown(object sender, MouseEventArgs e) { switch (e.Button) { case MouseButtons.Right: break; case MouseButtons.Left: mTimeBegin = snapTimeScroll(mCursor.X); mToneBegin = 127 + vScroll.Minimum - vScroll.Value - mCursor.Y / mToneHeight; mTimeEnd = mTimeBegin; mToneEnd = mToneBegin; if (tsbWrite.Checked) { if (hasGrippedNote()) { mSelectState = E_SELECT.SELECT; } else { mSelectState = E_SELECT.DRAG; } } else { if (hasSelectedGripNote()) { mSelectState = E_SELECT.SELECT_AREA; } else { mSelectState = E_SELECT.DRAG; } } break; } }
private void picRoll_KeyUp(object sender, KeyEventArgs e) { mPressKey = Keys.None; mPressAlt = false; switch (e.KeyCode) { case Keys.Escape: mSelectState = E_SELECT.NONE; break; case Keys.F1: setSelectWrite(tsbWrite); break; case Keys.F2: setSelectWrite(tsbSelect); break; case Keys.F3: setEditMode(tsmEditModeNote); break; } }
private void setSelectWrite(object item) { tsbWrite.Checked = false; tsbWrite.Image = Properties.Resources.write_disable; tsbSelect.Checked = false; tsbSelect.Image = Properties.Resources.select_disable; var obj = (ToolStripButton)item; obj.Checked = true; switch (obj.Name) { case "tsbWrite": tsbWrite.Image = Properties.Resources.write; break; case "tsbSelect": tsbSelect.Image = Properties.Resources.select; break; } mSelectState = E_SELECT.NONE; }