/// <inheritdoc/> public override void Deserialize(FRReader reader) { base.Deserialize(reader); points = new List <PointF>(); pointTypes = new List <byte>(); string polyPoints = reader.ReadStr("PolyPoints"); foreach (string str in polyPoints.Split('|')) { string[] point = str.Split('\\'); if (point.Length == 3) { float f1 = float.Parse(point[0].Replace(',', '.'), CultureInfo.InvariantCulture); float f2 = float.Parse(point[1].Replace(',', '.'), CultureInfo.InvariantCulture); addPoint(f1, f2, byte.Parse(point[2])); } } if (reader.HasProperty("CenterX")) { center.X = reader.ReadFloat("CenterX"); } if (reader.HasProperty("CenterY")) { center.Y = reader.ReadFloat("CenterY"); } //recalculateBounds(); }
public override void Deserialize(FRReader reader) { FPageType = RegisteredObjects.FindType(reader.ReadStr("PageType")); while (reader.NextItem()) { Base c = reader.Read() as Base; if (c != null) { FObjects.Add(c); } } }
/// <inheritdoc/> public override void Deserialize(FRReader reader) { base.Deserialize(reader); if (reader.HasProperty("ChartData")) { string streamStr = reader.ReadStr("ChartData"); using (MemoryStream stream = Converter.FromString(typeof(Stream), streamStr) as MemoryStream) { FChart.Serializer.Reset(); FChart.Serializer.Load(stream); } } }
/// <inheritdoc/> public override void Deserialize(FRReader reader) { base.Deserialize(reader); pointsCollection.Clear(); if (reader.HasProperty("PolyPoints")) { string polyPoints = reader.ReadStr("PolyPoints"); foreach (string str in polyPoints.Split('|')) { string[] point = str.Split('\\'); if (point.Length == 3) { float f1 = float.Parse(point[0].Replace(',', '.'), CultureInfo.InvariantCulture); float f2 = float.Parse(point[1].Replace(',', '.'), CultureInfo.InvariantCulture); pointsCollection.Add(new PolyPoint(f1, f2)); } } } else if (reader.HasProperty("PolyPoints_v2")) { string polyPoints = reader.ReadStr("PolyPoints_v2"); foreach (string str in polyPoints.Split('|')) { PolyPoint point = new PolyPoint(); point.Deserialize(str); pointsCollection.Add(point); } } if (reader.HasProperty("CenterX")) { center.X = reader.ReadFloat("CenterX"); } if (reader.HasProperty("CenterY")) { center.Y = reader.ReadFloat("CenterY"); } //recalculateBounds(); }