public override object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector) { ShapeGraphic s = (ShapeGraphic)base.SetObjectData(obj, info, context, selector); s.Pen = (PenX)info.GetValue("LinePen", typeof(PenX)); s.Brush = (BrushX)info.GetValue("FillBrush", typeof(BrushX)); return(s); } // end of SetObjectData
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { ShapeGraphic s = this; base.GetObjectData(info, context); info.AddValue("LinePen", s._linePen); info.AddValue("FillBrush", s._fillBrush); }
public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info) { ShapeGraphic s = (ShapeGraphic)obj; info.AddBaseValueEmbedded(s, typeof(ShapeGraphic).BaseType); info.AddValue("LinePen", s._linePen); info.AddValue("Fill", s._fillBrush.IsVisible); info.AddValue("FillBrush", s._fillBrush); }
protected override void CopyFrom(GraphicBase bfrom) { ShapeGraphic from = bfrom as ShapeGraphic; if (from != null) { this._fillBrush = (BrushX)from._fillBrush.Clone(); this._linePen = (PenX)from._linePen.Clone(); } base.CopyFrom(bfrom); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ShapeGraphic s = (ShapeGraphic)o; info.GetBaseValueEmbedded(s, typeof(ShapeGraphic).BaseType, parent); s.Pen = (PenX)info.GetValue("LinePen", s); bool fill = info.GetBoolean("Fill"); s.Brush = (BrushX)info.GetValue("FillBrush", s); return(s); }
public ShapeGraphic(ShapeGraphic from) : base(from) // all is done here, since CopyFrom is virtual! { }