private void AddTrackView(TrackModel trackData) { BaseTrackView trackView = TimelineViewHelper.GetTrackView(trackData); trackView.Init(window, Model); trackView.Sequence = this; Tracklist.Add(trackView); RefreshTrackIndex(); }
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(); }
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); }