Exemplo n.º 1
0
        // Event handler for ticking
        private void OnEnded(object sender, EventArgs e)
        {
            if (((Clock)sender).CurrentState != ClockState.Active)
            {
                hostManager.Pause();

                //hostManager.Seek((int)timeClocks[timeArrayIndex].Timeline.Duration,TimeSeekOrigin.BeginTime);
                TimeControlArgs tca1 = new TimeControlArgs();
                tca1.curTime = hostManager.CurrentTime.HasValue ? (int)hostManager.CurrentTime.Value.TotalMilliseconds : 0;
                if (timeArrayIndex == (timeArray.Length - 1)) { tca1.lastTick = true; }
                this.FireTickEvent(tca1);

                hostManager.Resume();
                timeArrayIndex ++;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// fire a tick Event
 /// </summary>
 public void FireTickEvent(TimeControlArgs tca)
 {
     if(Ticked != null){ Ticked(this,tca); }
 }