Example #1
0
        public TrackablePoint(XmlReader r, PointF scale, TimestampMapper timeMapper)
        {
            r.ReadStartElement();

            while (r.NodeType == XmlNodeType.Element)
            {
                switch (r.Name)
                {
                case "TrackerParameters":
                    trackerParameters = TrackerParameters.ReadXml(r, scale);
                    break;

                case "NonTrackingValue":
                    nonTrackingValue = XmlHelper.ParsePointF(r.ReadElementContentAsString());
                    nonTrackingValue = nonTrackingValue.Scale(scale.X, scale.Y);
                    break;

                case "CurrentValue":
                    currentValue = XmlHelper.ParsePointF(r.ReadElementContentAsString());
                    currentValue = currentValue.Scale(scale.X, scale.Y);
                    break;

                case "Timeline":
                    ParseTimeline(r, scale, timeMapper);
                    break;

                default:
                    string unparsed = r.ReadOuterXml();
                    break;
                }
            }

            r.ReadEndElement();
        }