예제 #1
0
        public void SetData(TracklineData data)
        {
            Data = data;

            actionDrawers.Clear();

            foreach (var d in data.Actions)
            {
                ActionDrawer drawer = new ActionDrawer(this);
                drawer.SetData(d);

                actionDrawers.Add(drawer);
            }
        }
예제 #2
0
        internal void OnTrackAdded(TracklineData tracklineData, int insertIndex = -1)
        {
            if (insertIndex < 0)
            {
                insertIndex = trackDrawers.Count;
            }

            TracklineDrawer tracklineDrawer = new TracklineDrawer(this);

            tracklineDrawer.SetData(tracklineData);

            Data.Tracks.Insert(insertIndex, tracklineData);
            trackDrawers.Insert(insertIndex, tracklineDrawer);
        }