Esempio n. 1
0
 private void ImportTrackData(Metadata metadata)
 {
     foreach (DrawingTrack track in metadata.Tracks())
     {
         TimeSeriesPlotData data = new TimeSeriesPlotData(track.Name, track.MainColor, track.TimeSeriesCollection);
         timeSeriesData.Add(data);
         filteredTrajectories.Add(data, track.FilteredTrajectory);
     }
 }
Esempio n. 2
0
        private void WriteTracks(XmlWriter w)
        {
            bool atLeastOne = false;

            foreach (DrawingTrack track in metadata.Tracks())
            {
                if (!atLeastOne)
                {
                    w.WriteStartElement("Tracks");
                    atLeastOne = true;
                }

                w.WriteStartElement("Track");
                w.WriteAttributeString("id", track.Id.ToString());
                w.WriteAttributeString("name", track.Name);
                track.WriteXml(w, SerializationFilter.All);
                w.WriteEndElement();
            }

            if (atLeastOne)
            {
                w.WriteEndElement();
            }
        }