Exemple #1
0
        /// <summary>
        /// 선택된 TimeLine의 Track을 한정으로 재생 정보를 받는 <see cref="TimingReader"/>를 토기화합니다.
        /// </summary>
        /// <param name="timeLine"></param>
        /// <param name="track"></param>
        public TimingReader(TimeLine timeLine, Track track)
        {
            TimeLine = timeLine;
            Track    = track;

            TimeLine.FrameChanged      += TimeLine_FrameChanged;
            TimeLine.FrameMouseChanged += (s, e) =>
            {
                lastPlayingItem.ForEach(i => OnItemEnded(i, new TimingEventArgs(timeLine, CurrentFrame)));
                lastPlayingItem = Enumerable.Empty <TrackItem>();
            };

            TimeLine.TimeLineStarted += (s, e) => TimeLineStarted?.Invoke(s, e);
            TimeLine.TimeLineStopped += (s, e) =>
            {
                lastPlayingItem.ForEach(i => OnItemEnded(i, new TimingEventArgs(timeLine, CurrentFrame)));
                lastPlayingItem = Enumerable.Empty <TrackItem>();
                TimeLineStopped?.Invoke(s, e);
            };
        }
Exemple #2
0
 internal void OnTimeLineStarted(object sender, EventArgs e)
 {
     TimeLineStarted?.Invoke(sender, e);
 }