private void chkButton_CheckedChanged(object sender, EventArgs e) { FrameInput f = mov.getInput(mov.CurrentFrame); f.setButton((int)numButtonID.Value, chkButton.Checked); mov.setInput(mov.CurrentFrame, f); }
private void btnSetNextTo_Click(object sender, EventArgs e) { int startAt = (int)numViewFrame.Value; // Get an array of the buttons to change. int[] change = new int[13]; int ci = 0; for (int i = 0; i < 13; i++) { if (checks[i].ForeColor == Color.Black) { change[ci] = i; ci += 1; } } Array.Resize(ref change, ci); // Touch change? bool touch = (lblTouch.ForeColor == Color.Black); // Make sure number to change is not too high/low int lastnext = 1; int toChange = (int)numNextLast.Value; if (rdoLast.Checked) { toChange = -toChange; lastnext = -1; } if (startAt + toChange < 0) { toChange -= (startAt + toChange); } if (startAt + toChange >= mov.MovieLength) { toChange -= (startAt + toChange - mov.MovieLength - 1); } // Set next/last frames for (int i = 0; i < (int)numNextLast.Value; i++) { startAt += lastnext; FrameInput f = mov.getInput(startAt); for (int ic = 0; ic < change.Length; ic++) { f.setButton(change[ic], checks[change[ic]].Checked); } if (touch) { f.touchP = cFrame.touchP; f.touchX = cFrame.touchX; f.touchY = cFrame.touchY; } mov.setInput(startAt, f); } }
// change input private void chkAnyButton_CheckChanged(object sender, EventArgs e) { if (AutoChange) { return; } FrameInput f = mov.getInput((int)numViewFrame.Value); for (int i = 0; i < checks.Length; i++) { f.setButton(i, checks[i].Checked); } mov.setInput((int)numViewFrame.Value, f); }