private void timerPlayback_Tick(object sender, EventArgs e)
{
//Handle delay until playback actually starts
if (!_playbackStarted)
{
_playbackStarted = _timedSequenceEditorForm.positionHasValue;
}
else
{
//detect if sequence reached the end
if (!_timedSequenceEditorForm.positionHasValue)
{
sequenceStop();
updatePositionControls(TimeSpan.Zero); //reset to beginning
updateControlsForStopped();
}
else
{
textBoxPosition.Text = _timingSource.Position.ToString();
updatePositionControls(_timingSource.Position);
//handle playback mode
if (_displayedCollection != null && radioButtonPlayback.Checked)
{
handlePlaybackModeTick();
}
}
}
}