public override void ReadXml(XmlReader reader) { reader.Read();// Skip ahead to next node base.ReadXml(reader); StartPoint = new MarkGeometryPoint(); StartPoint.ReadXml(reader); EndPoint = new MarkGeometryPoint(); EndPoint.ReadXml(reader); ReferencePoint = new MarkGeometryPoint(); ReferencePoint.ReadXml(reader); Update(); }
public override void ReadXml(XmlReader reader) { reader.Read();// Skip ahead to next node ReadXmlBaseImpl(reader); reader.ReadStartElement(); Width = double.Parse(reader.ReadElementString(nameof(Width))); reader.Read(); Height = double.Parse(reader.ReadElementString(nameof(Height))); Points = new List <MarkGeometryPoint>(); CentrePoint = new MarkGeometryPoint(); CentrePoint.ReadXml(reader); reader.Read(); reader.ReadEndElement(); GenerateView(); Update(); }
public override void ReadXml(XmlReader reader) { reader.Read(); // Skip ahead to next node base.ReadXml(reader); IsClosed = bool.Parse(reader.GetAttribute(nameof(IsClosed))); CentrePoint = new MarkGeometryPoint(); CentrePoint.ReadXml(reader); Points = new List <MarkGeometryPoint>(); if (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == nameof(Points)) { while (reader.MoveToContent() == XmlNodeType.Element) { var point = new MarkGeometryPoint(); point.ReadXml(reader); Points.Add(point); } } Update(); }