void playButton_MouseButtonClick(Widget source, EventArgs e) { if (movementSequenceController.Playing) { movementSequenceController.stopPlayback(); } else { movementSequenceController.CurrentSequence = movementSequence; movementSequenceController.playCurrentSequence(); } }
void sequenceController_SequenceAdded(MovementSequenceController controller, MovementSequenceGroup group, MovementSequenceInfo sequenceInfo) { ButtonGridItem item = buttonGrid.addItem(group.Name, sequenceInfo.Name); item.UserObject = sequenceInfo; item.ItemClicked += (s, e) => { MovementSequence sequence = sequenceController.loadSequence(sequenceInfo); sequenceController.stopPlayback(); sequenceController.CurrentSequence = sequence; sequenceController.playCurrentSequence(); this.hide(); }; }
void play_CheckedChanged(Widget source, EventArgs e) { if (recordingSequence != null) { if (play.Checked) { movementSequenceController.CurrentSequence = recordingSequence; movementSequenceController.playCurrentSequence(); play.Button.Caption = "Pause"; } else { movementSequenceController.stopPlayback(); movementSequenceController.CurrentSequence = null; play.Button.Caption = "Play"; } } }
void playButton_MouseButtonClick(Widget source, EventArgs e) { sequenceController.playCurrentSequence(); }