public void BuildTest()
        {
            TrackCollection tracks = LoadTracks();
            DateTime start = tracks.First.StartTime;
            DateTime end = tracks.Last.EndTime;
            TimelineValueCollection values = new TimelineValueCollection(start, end);
            values.Build(tracks);

            Assert.AreEqual(values.Count, 1);
        }
        private void RefreshView()
        {
            ClearPoints();
            if (Tracks == null) return;

            DateTime start = new DateTime();
            DateTime end = new DateTime();
            if (Tracks.First != null) {
                start = Tracks.First.StartTime;
            }
            if (Tracks.Last != null) {
                end = Tracks.Last.EndTime;
            }

            TimelineValueCollection values = new TimelineValueCollection(start, end);
            values.Build(Tracks);

            Clear();
            foreach (TimelineValue v in values) {
                AddTrack(v.Track);
                AddTrack(v.LastTrack);
            }
        }
Exemplo n.º 3
0
        private void RefreshView()
        {
            if (Tracks == null) return;

            DateTime start = new DateTime();
            DateTime end = new DateTime();
            if (Tracks.First != null) {
                start = Tracks.First.StartTime;
            }
            if (Tracks.Last != null) {
                end = Tracks.Last.EndTime;
            }

            AxisLabelProvider labels = new AxisLabelProvider();
            labels.BuildLabels(start, end);

            TimelineValueCollection values = new TimelineValueCollection(start, end);
            values.Build(Tracks);

            bar.AllBackground = this.AllBackground;
            bar.EventBackground = this.EventBackground;
            bar.RefreshBar(values, labels);
        }