public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { double offset = info.GetDouble("DashOffset"); int count = info.OpenArray("Pattern"); double[] pattern = new double[count]; for (int i = 0; i < pattern.Length; ++i) pattern[i] = info.GetDouble("e"); info.CloseArray(count); return DeserializeV0(new Custom(offset, pattern), info, parent); }
public object Deserialize(object obj, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { int count = info.OpenArray("List"); var s = null != obj ? (System.Collections.Generic.List<object>)obj : new System.Collections.Generic.List<object>(count); s.Clear(); for (int i = 0; i < count; ++i) s.Add(info.GetValue("e", parent)); info.CloseArray(count); return s; }
protected virtual LinkedScaleCollection SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { LinkedScaleCollection s = null != o ? (LinkedScaleCollection)o : new LinkedScaleCollection(); int count = info.OpenArray("Properties"); s._linkedScales = new LinkedScale[count]; for (int i = 0; i < count; ++i) s.SetLinkedScale((LinkedScale)info.GetValue("e", s), i); info.CloseArray(count); return s; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { int numberOfLevelsDown = info.GetInt32("LevelsDown"); int count = info.OpenArray("Path"); var arr = new string[count]; for (int i = 0; i < count; i++) arr[i] = info.GetString(); info.CloseArray(count); return new RelativeDocumentPath(numberOfLevelsDown, arr); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = null != o ? (ClosedCardinalSpline)o : new ClosedCardinalSpline(info); info.GetBaseValueEmbedded(s, typeof(ClosedCardinalSpline).BaseType, parent); s._tension = info.GetDouble("Tension"); s._curvePoints.Clear(); int count = info.OpenArray("Points"); for (int i = 0; i < count; i++) s._curvePoints.Add((PointD2D)info.GetValue("e", s)); info.CloseArray(count); return s; }
public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { FitEnsemble s = o!=null ? (FitEnsemble)o : new FitEnsemble(); int arraycount = info.OpenArray(); for(int i=0;i<arraycount;++i) s.Add( (FitElement)info.GetValue(s) ); info.CloseArray(arraycount); s.CollectParameterNames(); return s; }
protected virtual AdditionalTicks SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { AdditionalTicks s = null != o ? (AdditionalTicks)o : new AdditionalTicks(); int count; count = info.OpenArray("ByValues"); for (int i = 0; i < count; i++) s._additionalTicks.Add((AltaxoVariant)info.GetValue("e", s)); info.CloseArray(count); return s; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = null != o ? (ShapeGroup)o : new ShapeGroup(); info.GetBaseValueEmbedded(s, typeof(ShapeGroup).BaseType, parent); int count = info.OpenArray("Elements"); var list = new GraphicBase[count]; for (int i = 0; i < count; i++) list[i] = (GraphicBase)info.GetValue("e", s); info.CloseArray(count); s.AddRange(list); return s; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { int count = info.OpenArray("ColorSets"); var colorSets = new Tuple<IColorSet, bool>[count]; for (int i = 0; i < count; ++i) { info.OpenElement(); // e colorSets[i] = new Tuple<IColorSet, bool>((IColorSet)info.GetValue("ColorSet", null), info.GetBoolean("IsPlotColorSet")); info.CloseElement(); } info.CloseArray(count); return new ColorSetBag(colorSets); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { int count = info.OpenArray("RowSelections"); var list = new List<IRowSelection>(); for (int i = 0; i < count; ++i) { list.Add((IRowSelection)info.GetValue("e", parent)); } info.CloseArray(count); return new IntersectionOfRowSelections(info, list); }
protected virtual AsciiImportDataSource SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = (o == null ? new AsciiImportDataSource() : (AsciiImportDataSource)o); s._isDeserializationInProgress = true; s.ChildSetMember(ref s._importOptions, (IDataSourceImportOptions)info.GetValue("ImportOptions", s)); s.ChildSetMember(ref s._asciiImportOptions, (AsciiImportOptions)info.GetValue("AsciiImportOptions", s)); var count = info.OpenArray("AsciiFiles"); for (int i = 0; i < count; ++i) s._asciiFiles.Add((AbsoluteAndRelativeFileName)info.GetValue("e", s)); info.CloseArray(count); info.AfterDeserializationHasCompletelyFinished += s.EhAfterDeserializationHasCompletelyFinished; return s; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { GraphicCollection s = null!=o ? (GraphicCollection)o : new GraphicCollection(); int count = info.OpenArray(); for(int i=0;i<count;i++) { GraphicBase go = (GraphicBase)info.GetValue(s); s.Add(go); } info.CloseArray(count); return s; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { AscendingIntegerCollection s = null != o ? (AscendingIntegerCollection)o : new AscendingIntegerCollection(); int count = info.OpenArray(); for (int i = 0; i < count; i++) { info.OpenElement(); int rangestart = info.GetInt32("Start"); int rangecount = info.GetInt32("Count"); info.CloseElement(); s.AddRange(rangestart, rangecount); } info.CloseArray(count); return s; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { WorksheetLayoutCollection s = null!=o ? (WorksheetLayoutCollection)o : new WorksheetLayoutCollection(); int count; count = info.OpenArray(); // TableLayouts for(int i=0;i<count;i++) { WorksheetLayout style = (WorksheetLayout)info.GetValue("WorksheetLayout",s); s.m_TableLayouts.Add(style.Guid,style); } info.CloseArray(count); return s; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { string colorSetName = info.GetString("Name"); var colorSetLevel = (Altaxo.Main.ItemDefinitionLevel)info.GetEnum("Level", typeof(Altaxo.Main.ItemDefinitionLevel)); var creationDate = info.GetDateTime("CreationDate"); var isPlotColorSet = info.GetBoolean("IsPlotColorSet"); int count = info.OpenArray("Colors"); var colors = new NamedColor[count]; for (int i = 0; i < count; ++i) { string name = info.GetStringAttribute("Name"); string cvalue = info.GetString("e"); colors[i] = new NamedColor(AxoColor.FromInvariantString(cvalue), name); } info.CloseArray(count); return new ColorSet(colorSetName, colors); }
public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { FitElement s = o!=null ? (FitElement)o : new FitElement(); s.FitFunction = (IFitFunction)info.GetValue("FitFunction",s); int numRows = info.GetInt32("NumberOfRows"); int firstRow = info.GetInt32("FirstRow"); s._rangeOfRows = PositiveIntegerRange.NewFromFirstAndCount(firstRow,numRows); int arraycount = info.OpenArray(); s._independentVariables = new NumericColumnProxy[arraycount]; for(int i=0;i<arraycount;++i) s._independentVariables[i] = (NumericColumnProxy)info.GetValue(s); info.CloseArray(arraycount); arraycount = info.OpenArray(); s._dependentVariables = new NumericColumnProxy[arraycount]; for(int i=0;i<arraycount;++i) s._dependentVariables[i] = (NumericColumnProxy)info.GetValue(s); info.CloseArray(arraycount); arraycount = info.OpenArray(); s._errorEvaluation = new IVarianceScaling[arraycount]; for(int i=0;i<arraycount;++i) s._errorEvaluation[i] = (IVarianceScaling)info.GetValue(s); info.CloseArray(arraycount); info.GetArray("ParameterNames",out s._parameterNames); for(int i=0;i<s._parameterNames.Length;++i) if(s._parameterNames[i]==string.Empty) s._parameterNames[i]=null; // serialization can not distinguish between an empty string and a null string s._parameterNameStart = info.GetString("ParameterNameStart"); return s; }
private ColorSet(Altaxo.Serialization.Xml.IXmlDeserializationInfo info) { _name = info.GetString("Name"); int count = info.OpenArray("Colors"); _innerList = new NamedColor[count]; for (int i = 0; i < count; ++i) { string name = info.GetStringAttribute("Name"); string cvalue = info.GetString("e"); _innerList[i] = new NamedColor(AxoColor.FromInvariantString(cvalue), name, this); } info.CloseArray(count); InitLazyVariables(); }
protected virtual XYPlotLayer SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYPlotLayer s = (o == null ? new XYPlotLayer() : (XYPlotLayer)o); int count; // Background IBackgroundStyle bgs = (IBackgroundStyle)info.GetValue("Background", s); if (null!=bgs) { if (!s.GridPlanes.Contains(CSPlaneID.Front)) s.GridPlanes.Add(new GridPlane(CSPlaneID.Front)); s.GridPlanes[CSPlaneID.Front].Background = bgs.Brush; } // size, position, rotation and scale s.Location = (XYPlotLayerPositionAndSize)info.GetValue("LocationAndSize", s); s._cachedLayerSize = (SizeF)info.GetValue("CachedSize", typeof(SizeF)); s._cachedLayerPosition = (PointF)info.GetValue("CachedPosition", typeof(PointF)); s._coordinateSystem.UpdateAreaSize(s._cachedLayerSize); // LayerProperties bool clipDataToFrame = info.GetBoolean("ClipDataToFrame"); s._dataClipping = clipDataToFrame ? LayerDataClipping.StrictToCS : LayerDataClipping.None; // axis related s.LinkedScales = (LinkedScaleCollection)info.GetValue("AxisProperties", s); // Styles G2DScaleStyleCollection ssc = (G2DScaleStyleCollection)info.GetValue("AxisStyles", s); GridPlane gplane = new GridPlane(CSPlaneID.Front); gplane.GridStyle[0] = ssc.ScaleStyle(0).GridStyle; gplane.GridStyle[1] = ssc.ScaleStyle(1).GridStyle; s.GridPlanes.Add(gplane); foreach (AxisStyle ax in ssc.AxisStyles) s._axisStyles.Add(ax); // Legends count = info.OpenArray("Legends"); s.Legend = (TextGraphic)info.GetValue("e", s); info.CloseArray(count); // XYPlotLayer specific count = info.OpenArray("LinkedLayers"); s.LinkedLayerLink = (Main.RelDocNodeProxy)info.GetValue("e", s); info.CloseArray(count); s.GraphObjects = (GraphicCollection)info.GetValue("GraphicGlyphs", s); s.PlotItems = (PlotItemCollection)info.GetValue("Plots", s); return s; }
protected virtual XYPlotLayer SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYPlotLayer s = (o == null ? new XYPlotLayer() : (XYPlotLayer)o); int count; // size, position, rotation and scale s.Location = (XYPlotLayerPositionAndSize)info.GetValue("LocationAndSize", s); s._cachedLayerSize = (SizeF)info.GetValue("CachedSize", typeof(SizeF)); s._cachedLayerPosition = (PointF)info.GetValue("CachedPosition", typeof(PointF)); // CoordinateSystem s.CoordinateSystem = (G2DCoordinateSystem)info.GetValue("CoordinateSystem", s); s.CoordinateSystem.UpdateAreaSize(s._cachedLayerSize); // linked layers count = info.OpenArray("LinkedLayers"); s.LinkedLayerLink = (Main.RelDocNodeProxy)info.GetValue("e", s); info.CloseArray(count); // Scales s.LinkedScales = (LinkedScaleCollection)info.GetValue("Scales", s); // Grid planes s.GridPlanes = (GridPlaneCollection)info.GetValue("GridPlanes",s); // Axis Styles s.AxisStyles = (AxisStyleCollection)info.GetValue("AxisStyles", s); // Legends s.Legends = (GraphicCollection)info.GetValue("Legends", s); // Graphic objects s.GraphObjects = (GraphicCollection)info.GetValue("GraphObjects", s); // Data Clipping s.ClipDataToFrame = (LayerDataClipping)info.GetValue("DataClipping", s); // PlotItemCollection s.PlotItems = (PlotItemCollection)info.GetValue("Plots", s); return s; }
protected virtual ScaleStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ScaleStyle s = null != o ? (ScaleStyle)o : new ScaleStyle(); s.GridStyle = (GridStyle)info.GetValue("Grid", s); int count = info.OpenArray(); //s._axisStyles = new XYPlotLayerAxisStyleProperties[count]; for (int i = 0; i < count; ++i) s._axisStyles.Add((AxisStyle)info.GetValue("e", s)); info.CloseArray(count); return s; }
protected virtual G2DScaleStyleCollection SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { G2DScaleStyleCollection s = null != o ? (G2DScaleStyleCollection)o : new G2DScaleStyleCollection(); int count = info.OpenArray(); s._styles = new ScaleStyle[count]; for (int i = 0; i < count; ++i) s.SetScaleStyle((ScaleStyle)info.GetValue("e", s), i); info.CloseArray(count); return s; }
public virtual void Deserialize(GraphDocument s, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { // info.GetBaseValueEmbedded(s,typeof(GraphDocument).BaseType,parent); s._name = info.GetString("Name"); s._pageBounds = (RectangleF)info.GetValue("PageBounds",s); s._printableBounds = (RectangleF)info.GetValue("PrintableBounds",s); s._layers = (XYPlotLayerCollection)info.GetValue("LayerList",s); s._layers.ParentObject = s; s._layers.SetPrintableGraphBounds(s._printableBounds, false); // new in version 1 - Add graph properties int numberproperties = info.OpenArray(); // "GraphProperties" for(int i=0;i<numberproperties;i++) { info.OpenElement(); // "e" string propkey = info.GetString("Key"); object propval = info.GetValue("Value",parent); info.CloseElement(); // "e" s.SetGraphProperty(propkey,propval); } info.CloseArray(numberproperties); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYPlotLayerCollection s = null!=o ? (XYPlotLayerCollection)o : new XYPlotLayerCollection(); int count = info.OpenArray(); for(int i=0;i<count;i++) { XYPlotLayer l = (XYPlotLayer)info.GetValue("XYPlotLayer",s); s.Add(l); } info.CloseArray(count); return s; }
public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ProductFunction s = null != o ? (ProductFunction)o : new ProductFunction(); info.GetArray("Coefficients", out s._coefficients); int cnt = info.OpenArray(); s._functions = new Altaxo.Calc.IScalarFunctionDD[cnt]; for (int i = 0; i < cnt; i++) s._functions[i] = (Altaxo.Calc.IScalarFunctionDD)info.GetValue("e", parent); info.CloseArray(cnt); return s; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { bool bSurrogateUsed = false; XYZMeshedColumnPlotData s = null != o ? (XYZMeshedColumnPlotData)o : new XYZMeshedColumnPlotData(); XmlSerializationSurrogate0 surr = new XmlSerializationSurrogate0(); #pragma warning disable 618 s._matrixProxy = DataTableMatrixProxy.CreateEmptyInstance(); // this instance is replaced later in the deserialization callback function and is intended to avoid null reference errors #pragma warning restore 618 object deserobj; deserobj = info.GetValue("XColumn", s); if (deserobj is Main.AbsoluteDocumentPath) { surr._xColumnPath = (Main.AbsoluteDocumentPath)deserobj; bSurrogateUsed = true; } else { surr._xColumnProxy = ReadableColumnProxyBase.FromColumn((Altaxo.Data.INumericColumn)deserobj); } deserobj = info.GetValue("YColumn", s); if (deserobj is Main.AbsoluteDocumentPath) { surr._yColumnPath = (Main.AbsoluteDocumentPath)deserobj; bSurrogateUsed = true; } else { surr._yColumnProxy = ReadableColumnProxyBase.FromColumn((Altaxo.Data.INumericColumn)deserobj); } int count = info.OpenArray(); surr._vColumnPaths = new Main.AbsoluteDocumentPath[count]; surr._vColumnProxies = new IReadableColumnProxy[count]; for (int i = 0; i < count; i++) { deserobj = info.GetValue("e", s); if (deserobj is Main.AbsoluteDocumentPath) { surr._vColumnPaths[i] = (Main.AbsoluteDocumentPath)deserobj; bSurrogateUsed = true; } else { surr._vColumnProxies[i] = ReadableColumnProxyBase.FromColumn((Altaxo.Data.IReadableColumn)deserobj); } } info.CloseArray(count); s._xBoundaries = (IPhysicalBoundaries)info.GetValue("XBoundaries", s); s._yBoundaries = (IPhysicalBoundaries)info.GetValue("YBoundaries", s); s._vBoundaries = (IPhysicalBoundaries)info.GetValue("VBoundaries", s); s._xBoundaries.ParentObject = s; s._yBoundaries.ParentObject = s; s._vBoundaries.ParentObject = s; if (bSurrogateUsed) { surr._plotAssociation = s; info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(surr.EhDeserializationFinished); } return s; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYZMeshedColumnPlotData s = null != o ? (XYZMeshedColumnPlotData)o : new XYZMeshedColumnPlotData(); var _xColumn = (IReadableColumnProxy)info.GetValue("XColumn", s); var _yColumn = (IReadableColumnProxy)info.GetValue("YColumn", s); int count = info.OpenArray(); var _dataColumns = new IReadableColumnProxy[count]; for (int i = 0; i < count; i++) { _dataColumns[i] = (IReadableColumnProxy)info.GetValue("e", s); } info.CloseArray(count); #pragma warning disable 618 s._matrixProxy = new DataTableMatrixProxy(_xColumn, _yColumn, _dataColumns); #pragma warning restore 618 s._xBoundaries = (IPhysicalBoundaries)info.GetValue("XBoundaries", s); s._yBoundaries = (IPhysicalBoundaries)info.GetValue("YBoundaries", s); s._vBoundaries = (IPhysicalBoundaries)info.GetValue("VBoundaries", s); s._matrixProxy.ParentObject = s; s._xBoundaries.ParentObject = s; s._yBoundaries.ParentObject = s; s._vBoundaries.ParentObject = s; s._isCachedDataValid = false; return s; }
public override object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYColumnPlotData s = null != o ? (XYColumnPlotData)o : new XYColumnPlotData(info); base.Deserialize(s, info, parent); bool bNeedsCallback = false; object labelColumn = null; int nOptionalData = info.OpenArray(); { if (nOptionalData == 1) { string keystring = info.GetNodeName(); labelColumn = info.GetValue("LabelColumn", s); if (labelColumn is Altaxo.Data.IReadableColumn) s._deprecatedLabelColumn = (Altaxo.Data.IReadableColumn)labelColumn; else if (labelColumn is Main.AbsoluteDocumentPath) bNeedsCallback = true; } } info.CloseArray(nOptionalData); if (bNeedsCallback) { XmlSerializationSurrogate2 surr = new XmlSerializationSurrogate2(); surr._labelColumn = labelColumn as Main.AbsoluteDocumentPath; surr._plotAssociation = s; info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(surr.EhDeserializationFinished2); } return s; }
protected virtual XYPlotLayer SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYPlotLayer s = (o == null ? new XYPlotLayer(info) : (XYPlotLayer)o); int count; // Background IBackgroundStyle bgs = (IBackgroundStyle)info.GetValue("Background", s); if (null != bgs) { if (!s.GridPlanes.Contains(CSPlaneID.Front)) s.GridPlanes.Add(new GridPlane(CSPlaneID.Front)); s.GridPlanes[CSPlaneID.Front].Background = bgs.Brush; } // size, position, rotation and scale var location = (XYPlotLayerPositionAndSize_V0)info.GetValue("LocationAndSize", s); s._cachedLayerSize = (SizeF)info.GetValue("CachedSize", s); s._cachedLayerPosition = (PointF)info.GetValue("CachedPosition", s); s._coordinateSystem.UpdateAreaSize(s._cachedLayerSize); s.Location = location.ConvertToCurrentLocationVersion(s._cachedLayerSize, s._cachedLayerPosition); // LayerProperties bool clipDataToFrame = info.GetBoolean("ClipDataToFrame"); s._dataClipping = clipDataToFrame ? LayerDataClipping.StrictToCS : LayerDataClipping.None; // axis related var linkedScales = (Altaxo.Graph.Scales.Deprecated.LinkedScaleCollection)info.GetValue("AxisProperties", s); s.SetupOldAxes(linkedScales); // Styles G2DScaleStyleCollection ssc = (G2DScaleStyleCollection)info.GetValue("AxisStyles", s); GridPlane gplane = new GridPlane(CSPlaneID.Front); gplane.GridStyle[0] = ssc.ScaleStyle(0).GridStyle; gplane.GridStyle[1] = ssc.ScaleStyle(1).GridStyle; s.GridPlanes.Add(gplane); foreach (AxisStyle ax in ssc.AxisStyles) s._axisStyles.Add(ax); // Legends count = info.OpenArray("Legends"); var legend = (TextGraphic)info.GetValue("e", s); info.CloseArray(count); // XYPlotLayer specific count = info.OpenArray("LinkedLayers"); var linkedLayer = (Main.RelDocNodeProxy)info.GetValue("e", s); info.CloseArray(count); ProvideLinkedScalesWithLinkedLayerIndex(s, linkedLayer, info); s.GraphObjects.AddRange((IEnumerable<IGraphicBase>)info.GetValue("GraphicGlyphs", s)); if (null != legend) { var legend1 = new LegendText(legend); s.GraphObjects.Add(legend1); } s.PlotItems = (PlotItemCollection)info.GetValue("Plots", s); return s; }
public virtual void SDeserialize(PlotGroupStyleCollectionBase s, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { Type parentStyleType = null; int count = info.OpenArray(); for (int i = 0; i < count; i++) { IPlotGroupStyle style = (IPlotGroupStyle)info.GetValue("Style", s); bool hasChild = info.GetBoolean("HasChild"); s.Add(style, parentStyleType); parentStyleType = hasChild ? style.GetType() : null; } info.CloseArray(count); s._plotGroupStrictness = (PlotGroupStrictness)info.GetEnum("Strictness", typeof(PlotGroupStrictness)); }
protected virtual XYPlotLayer SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYPlotLayer s = (o == null ? new XYPlotLayer(info) : (XYPlotLayer)o); int count; // size, position, rotation and scale var location = (XYPlotLayerPositionAndSize_V0)info.GetValue("LocationAndSize", s); s._cachedLayerSize = (SizeF)info.GetValue("CachedSize", s); s._cachedLayerPosition = (PointF)info.GetValue("CachedPosition", s); s.Location = location.ConvertToCurrentLocationVersion(s._cachedLayerSize, s._cachedLayerPosition); // CoordinateSystem s.CoordinateSystem = (G2DCoordinateSystem)info.GetValue("CoordinateSystem", s); s.CoordinateSystem.UpdateAreaSize(s._cachedLayerSize); // linked layers count = info.OpenArray("LinkedLayers"); var linkedLayer = (Main.RelDocNodeProxy)info.GetValue("e", s); info.CloseArray(count); // Scales s.Scales = (ScaleCollection)info.GetValue("Scales", s); ProvideLinkedScalesWithLinkedLayerIndex(s, linkedLayer, info); // Grid planes s.GridPlanes = (GridPlaneCollection)info.GetValue("GridPlanes", s); // Axis Styles s.AxisStyles = (AxisStyleCollection)info.GetValue("AxisStyles", s); // Legends var legends = (IList<IGraphicBase>)info.GetValue("Legends", s); // Graphic objects s.GraphObjects.AddRange((IEnumerable<IGraphicBase>)info.GetValue("GraphObjects", s)); foreach (var item in legends) { if (item is TextGraphic) { var l = new LegendText((TextGraphic)item); s.GraphObjects.Add(l); } } // Data Clipping s.ClipDataToFrame = (LayerDataClipping)info.GetValue("DataClipping", s); // PlotItemCollection s.PlotItems = (PlotItemCollection)info.GetValue("Plots", s); return s; }