示例#1
0
        private void AddTrackView(TrackModel trackData)
        {
            BaseTrackView trackView = TimelineViewHelper.GetTrackView(trackData);

            trackView.Init(window, Model);
            trackView.Sequence = this;
            Tracklist.Add(trackView);
            RefreshTrackIndex();
        }
示例#2
0
 public void RemoveTrack(BaseTrackView track)
 {
     for (int i = 0; i < Tracklist.Count; i++)
     {
         if (Tracklist[i].Equals(track))
         {
             Tracklist.RemoveAt(i);
             break;
         }
     }
     Timeline.Tracks.Remove(track.Track);
     RefreshTrackIndex();
 }
示例#3
0
        private float CalcSequenceDurationTime()
        {
            float dur = 0;

            for (int i = 0; i < Tracklist.Count; i++)
            {
                BaseTrackView trackView = Tracklist[i];
                trackView.Cliplist.ForEach((clip) =>
                {
                    ClipModel clipData = clip.Clip;
                    if (clipData.EndTime > dur)
                    {
                        dur = clipData.EndTime;
                    }
                });
            }
            return(dur);
        }