public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = null != o ? (DeprecatedLineShape)o : new DeprecatedLineShape(info); info.GetBaseValueEmbedded(s, "AltaxoBase,Altaxo.Graph.GraphicsObject,0", parent); if (info.CurrentElementName == "LinePen")// 2012-06-18 bugfix: the next three lines are in some cases deserialized in ClosedPathShapeBase { s.Pen = (PenX)info.GetValue("LinePen", s); info.GetBoolean("Fill"); info.GetValue("FillBrush", s); } var l = new LineShape(info); l.CopyFrom(s); l.Pen = s.Pen; // we don't need to clone, since it is abandoned anyway return(l); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ColumnStyle s = (ColumnStyle)o; s.m_Size = (int)info.GetSingle("Size"); object notneeded; notneeded = info.GetValue("Pen", s); notneeded = info.GetValue("TextBrush", s); notneeded = info.GetValue("SelTextBrush", s); notneeded = info.GetValue("BkgBrush", s); notneeded = info.GetValue("SelBkgBrush", s); s.m_TextFormat.Alignment = (StringAlignment)Enum.Parse(typeof(StringAlignment), info.GetString("Alignment")); s.m_TextFont = (Font)info.GetValue("Font", s); return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { AxisLineStyle s = null != o ? (AxisLineStyle)o : new AxisLineStyle(); s._axisPen = (PenX)info.GetValue("AxisPen", s); s._majorTickPen = (PenX)info.GetValue("MajorPen", s); s._minorTickPen = (PenX)info.GetValue("MinorPen", s); s._majorTickLength = (float)info.GetSingle("MajorLength"); s._minorTickLength = (float)info.GetSingle("MinorLength"); s._axisPosition = (Calc.RelativeOrAbsoluteValue)info.GetValue("AxisPosition", s); s._showFirstUpMajorTicks = (bool)info.GetBoolean("Major1Up"); s._showFirstDownMajorTicks = (bool)info.GetBoolean("Major1Dw"); s._showFirstUpMinorTicks = (bool)info.GetBoolean("Minor1Up"); s._showFirstDownMinorTicks = (bool)info.GetBoolean("Minor1Dw"); s.WireEventChain(true); return(s); }
protected virtual ErrorBarPlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ErrorBarPlotStyle s = null != o ? (ErrorBarPlotStyle)o : new ErrorBarPlotStyle(); s._positiveErrorColumn = (Altaxo.Data.NumericColumnProxy)info.GetValue("PositiveError"); s._negativeErrorColumn = (Altaxo.Data.NumericColumnProxy)info.GetValue("NegativeError"); s._independentColor = info.GetBoolean("IndependentColor"); s.Pen = (PenX)info.GetValue("Pen", s); s._isHorizontalStyle = (0 == info.GetInt32("Axis")); s._independentSymbolSize = info.GetBoolean("IndependentSymbolSize"); s._symbolSize = info.GetInt32("SymbolSize"); s._symbolGap = info.GetBoolean("SymbolGap"); s._skipFreq = info.GetInt32("SkipFreq"); s._showEndBars = info.GetBoolean("ShowEndBars"); s._doNotShiftHorizontalPosition = info.GetBoolean("NotShiftHorzPos"); return(s); }
public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = null != o ? (ProjectItemReferenceClipboardList)o : new ProjectItemReferenceClipboardList(); s.BaseFolder = info.GetString("BaseFolder"); s.RelocateReferences = info.GetNullableBoolean("RelocateReferences"); s.TryToKeepInternalReferences = info.GetNullableBoolean("TryToKeepInternalReferences"); int count = info.OpenArray("Items"); s._projectItems = new List <DocNodeProxy>(); for (int i = 0; i < count; ++i) { s._projectItems.Add((DocNodeProxy)info.GetValue("e", s)); } info.CloseArray(count); return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYLineScatterPlotStyle s = null != o ? (XYLineScatterPlotStyle)o : new XYLineScatterPlotStyle(info); // do not use settings lie s.XYPlotLineStyle= here, since the XYPlotLineStyle is cloned, but maybe not fully deserialized here!!! s.m_LineStyle = (LinePlotStyle)info.GetValue("XYPlotLineStyle", s); // do not use settings lie s.XYPlotScatterStyle= here, since the XYPlotScatterStyle is cloned, but maybe not fully deserialized here!!! s.m_ScatterStyle = (ScatterPlotStyle)info.GetValue("XYPlotScatterStyle", s); s.m_LineSymbolGap = info.GetBoolean("LineSymbolGap"); int nCount = info.OpenArray(); // OptionalStyles if (nCount == 1) { s.m_LabelStyle = (LabelPlotStyle)info.GetValue("LabelStyle", s); // new in this version } info.CloseArray(nCount); // OptionalStyles return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { AxisLabelStyle s = null != o ? (AxisLabelStyle)o : new AxisLabelStyle(info); s._font = (FontX3D)info.GetValue("Font", s); s._brush = (IMaterial)info.GetValue("Brush", s); s.BackgroundStyle = (Background.IBackgroundStyle)info.GetValue("Background", s); s._automaticRotationShift = info.GetBoolean("AutoAlignment"); s._alignmentX = (Alignment)info.GetEnum("AlignmentX", typeof(Alignment)); s._alignmentY = (Alignment)info.GetEnum("AlignmentY", typeof(Alignment)); s._alignmentZ = (Alignment)info.GetEnum("AlignmentZ", typeof(Alignment)); s._rotationX = info.GetDouble("RotationX"); s._rotationY = info.GetDouble("RotationY"); s._rotationZ = info.GetDouble("RotationZ"); s._offsetX = info.GetDouble("OffsetX"); s._offsetY = info.GetDouble("OffsetY"); s._offsetZ = info.GetDouble("OffsetZ"); s._suppressedLabels = (SuppressedTicks)info.GetValue("SuppressedLabels", s); if (s._suppressedLabels != null) { s._suppressedLabels.ParentObject = s; } else { s._suppressedLabels = new SuppressedTicks() { ParentObject = s } }; s._labelFormatting = (ILabelFormatting)info.GetValue("LabelFormat", s); s._labelFormatting.ParentObject = s; s._labelSide = info.GetNullableEnum <CSAxisSide>("LabelSide"); return(s); } }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { AxisLabelStyle s = null != o ? (AxisLabelStyle)o : new AxisLabelStyle(info); var edge = (Edge)info.GetValue("Edge", s); s._font = (FontX)info.GetValue("Font", s); s._brush = (BrushX)info.GetValue("Brush", s); if (null != s._brush) { s._brush.ParentObject = s; } s._backgroundStyle = (IBackgroundStyle)info.GetValue("Background", s); if (null != s._backgroundStyle) { s._backgroundStyle.ParentObject = s; } s._automaticRotationShift = info.GetBoolean("AutoAlignment"); s._horizontalAlignment = (StringAlignment)info.GetEnum("HorzAlignment", typeof(StringAlignment)); s._verticalAlignment = (StringAlignment)info.GetEnum("VertAlignment", typeof(StringAlignment)); s._rotation = info.GetDouble("Rotation"); s._xOffset = info.GetDouble("XOffset"); s._yOffset = info.GetDouble("YOffset"); s._labelFormatting = (ILabelFormatting)info.GetValue("LabelFormat", s); s._labelFormatting.ParentObject = s; s._suppressedLabels = new SuppressedTicks() { ParentObject = s }; // Modification of StringFormat is necessary to avoid // too big spaces between successive words s._stringFormat = (StringFormat)StringFormat.GenericTypographic.Clone(); s._stringFormat.FormatFlags |= StringFormatFlags.MeasureTrailingSpaces; return(s); }
public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { RelDocNodeProxy s = null != o ? (RelDocNodeProxy)o : new RelDocNodeProxy(); if (!(parent is Main.IDocumentNode)) { throw new ArgumentException("Parent should be a valid document node"); } s._parentNode = (Main.IDocumentNode)parent; s._docNodePath = (Main.DocumentPath)info.GetValue("Node", s); // create a callback to resolve the instance as early as possible if (s._docNodePath != null && s._docNode == null) { info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(s.EhXmlDeserializationFinished); } return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = (AngularScale)o; s._cachedAxisOrg = info.GetDouble("Org"); s._cachedOneByAxisSpan = info.GetDouble("OneBySpan"); s._dataBounds = (Boundaries.NumericalBoundaries)info.GetValue("Bounds", s); s._dataBounds.ParentObject = s; s._rescaling = (Rescaling.AngularRescaleConditions)info.GetValue("Rescaling", s); s._rescaling.ParentObject = s; s._tickSpacing = (Ticks.TickSpacing)info.GetValue("TickSpacing", s); s._tickSpacing.ParentObject = s; s.SetCachedValues(); s.UpdateTicksAndOrgEndUsingRescalingObject(); 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 object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = null != o ? (GraphViewLayout)o : new GraphViewLayout(); var surr = new XmlSerializationSurrogate1 { _GraphController = s, _PathToGraph = (AbsoluteDocumentPath)info.GetValue("Graph", s) }; info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(surr.EhDeserializationFinished); s._isAutoZoomActive = info.GetBoolean("AutoZoom"); if (false == s._isAutoZoomActive) { s._zoomFactor = info.GetSingle("Zoom"); s._positionOfViewportsUpperLeftCornerInRootLayerCoordinates = (PointD2D)info.GetValue("ViewportOffset", s); } return(s); }
protected virtual GridStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { GridStyle s = null != o ? (GridStyle)o : new GridStyle(); s._showGrid = info.GetBoolean("Visible"); if (s._showGrid) { s._showZeroOnly = info.GetBoolean("ZeroOnly"); s._majorPen = (PenX)info.GetValue("MajorPen", s); s._majorPen.ParentObject = s; s._showMinor = info.GetBoolean("ShowMinor"); if (s._showMinor) { s._minorPen = (PenX)info.GetValue("MinorPen", s); s._minorPen.ParentObject = s; } } return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = (GraphicBase)o; if (null != s._location) { throw new InvalidProgramException("_location should be null here. Has the deserialization constructor been used?"); } s._location = (ItemLocationDirect)info.GetValue("Location", s); if (null != s._location) { s._location.ParentObject = s; } s._tag = info.GetString("Tag"); s.UpdateTransformationMatrix(); return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { Log10Scale s = null != o ? (Log10Scale)o : new Log10Scale(); s._log10Org = info.GetDouble("Log10Org"); s._log10End = info.GetDouble("Log10End"); s._decadesPerMajorTick = info.GetInt32("DecadesPerMajor"); // s.m_AxisOrgFixed = (bool)info.GetBoolean("OrgFixed"); // s.m_AxisEndFixed = (bool)info.GetBoolean("EndFixed"); s._dataBounds = (PositiveFiniteNumericalBoundaries)info.GetValue("Bounds", s); s._dataBounds.ParentObject = s; // new in version 1 s._rescaling = (LogarithmicScaleRescaleConditions)info.GetValue("Rescaling", s); return(s); }
public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { if (!(parent is Main.IDocumentNode)) { throw new ArgumentException("Parent should be a valid document node"); } var docNodePath = info.GetValue("Node", null) as RelativeDocumentPath; if (null == docNodePath || docNodePath.IsIdentity) { return(null); } var s = (RelDocNodeProxy)o ?? new RelDocNodeProxy(docNodePath, (IDocumentNode)parent); // create a callback to resolve the instance as early as possible info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(s.EhXmlDeserializationFinished); return(s); }
protected virtual BarGraphPlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { BarGraphPlotStyle s = null != o ? (BarGraphPlotStyle)o : new BarGraphPlotStyle(info); s._usePhysicalBaseValue = info.GetBoolean("UsePhysicalBaseValue"); s._baseValue = (Altaxo.Data.AltaxoVariant)info.GetValue("BaseValue", s); s._startAtPreviousItem = info.GetBoolean("StartAtPrevious"); s._previousItemZGap = info.GetDouble("PreviousItemGap"); s._pen = (PenX3D)info.GetValue("Pen", s); s._independentColor = info.GetBoolean("IndependentColor"); s._useUniformCrossSectionThickness = info.GetBoolean("UseUniformCrossSectionThickness"); s._barShiftStrategy = (BarShiftStrategy3D)info.GetEnum("BarShift", typeof(BarShiftStrategy3D)); s._barShiftMaxNumberOfItemsInOneDirection = info.GetInt32("BarShiftMaxItems"); s._relInnerGapX = info.GetDouble("InnerGapX"); s._relOuterGapX = info.GetDouble("OuterGapX"); s._relInnerGapY = info.GetDouble("InnerGapY"); s._relOuterGapY = info.GetDouble("OuterGapY"); return(s); }
public void Deserialize(OpenXMLExportOptions s, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { s.ExpandChildDocuments = info.GetBoolean("ExpandChildDocuments"); s.MaximumImageWidth = (Altaxo.Units.DimensionfulQuantity?)info.GetValue("MaxImageWidth", s); s.MaximumImageHeight = (Altaxo.Units.DimensionfulQuantity?)info.GetValue("MaxImageHeight", s); //if (info.CurrentElementName == "ImageResolution") s.ImageResolutionDpi = info.GetInt32("ImageResolution"); s.ThemeName = info.GetString("ThemeName"); //if (info.CurrentElementName == "RemoveOldContent") s.RemoveOldContentsOfTemplateFile = info.GetBoolean("RemoveOldContent"); s.OpenApplication = info.GetBoolean("OpenApplication"); s.OutputFileName = info.GetString("OutputFileName"); if (info.CurrentElementName == "RenumerateFigures") { s.RenumerateFigures = info.GetBoolean("RenumerateFigures"); s.UseAutomaticFigureNumbering = info.GetBoolean("UseAutomaticFigureNumbering"); s.DoNotFormatFigureLinksAsHyperlinks = info.GetBoolean("DoNotFormatFigureLinksAsHyperlinks"); } }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var colorValue = AxoColor.FromInvariantString(info.GetString("Color")); var colorName = info.GetString("Name"); // remember that colorName can be null or empty here. In this case, we use an autogenerated name if (info.CurrentElementName == "Set") { var colorSet = (Drawing.ColorManagement.IColorSet)info.GetValue("ColorSet", parent); ColorSetManager.Instance.TryRegisterList(info, colorSet, Main.ItemDefinitionLevel.Project, out var registeredColorSet); return(ColorManagement.ColorSetManager.Instance.GetDeserializedColorFromLevelAndSetName(info, colorValue, colorName, colorSet.Name)); // Note: here we use the name of the original color set, not of the registered color set. Because the original name is translated during registering into the registered name } else if (info.CurrentElementName == "SetName") { string colorSetName = info.GetString("SetName"); return(ColorManagement.ColorSetManager.Instance.GetDeserializedColorFromLevelAndSetName(info, colorValue, colorName, colorSetName)); } else // nothing of both, thus color belongs to nothing or to the standard color set { return(ColorManagement.ColorSetManager.Instance.GetDeserializedColorWithNoSet(colorValue, colorName)); } }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { GraphDocument s = null != o ? (GraphDocument)o : new GraphDocument(); // info.GetBaseValueEmbedded(s,typeof(GraphDocument).BaseType,parent); s._name = info.GetString("Name"); var pageBounds = (RectangleF)info.GetValue("PageBounds", s); var printableBounds = (RectangleF)info.GetValue("PrintableBounds", s); #pragma warning disable CS0618 // Type or member is obsolete var layers = (XYPlotLayer.XYPlotLayerCollection)info.GetValue("LayerList", s); #pragma warning restore CS0618 // Type or member is obsolete s._rootLayer.Location = new ItemLocationDirect { SizeX = RADouble.NewAbs(printableBounds.Size.Width), SizeY = RADouble.NewAbs(printableBounds.Size.Height) }; foreach (var l in layers) { s._rootLayer.Layers.Add(l); } return(s); }
protected virtual ScaleCollection SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ScaleCollection s = null != o ? (ScaleCollection)o : new ScaleCollection(info); int count = info.OpenArray("Members"); s._scales = new Scale[count]; for (int i = 0; i < count; ++i) { info.OpenElement(); // e var scale = (Scale)info.GetValue("Scale", s); var tickspacing = (Ticks.TickSpacing)info.GetValue("TickSpacing", s); scale.TickSpacing = tickspacing; scale.ParentObject = s; s._scales[i] = scale; info.CloseElement(); } info.CloseArray(count); return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { PlotItemCollection s = null != o ? (PlotItemCollection)o : new PlotItemCollection(); int count = info.OpenArray(); var plotItems = new IGPlotItem[count]; for (int i = 0; i < count; i++) { s.Add((IGPlotItem)info.GetValue("PlotItem", s)); } info.CloseArray(count); s._plotGroupStyles = (PlotGroupStyleCollection)info.GetValue("GroupStyles", s); if (null != s._plotGroupStyles) { s._plotGroupStyles.ParentObject = s; } return(s); }
public static object SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent, bool nativeCall) { LabelPlotStyle s = null != o ? (LabelPlotStyle)o : new LabelPlotStyle(); s._font = (Font)info.GetValue("Font", s); s._independentColor = info.GetBoolean("IndependentColor"); s._brush = (BrushX)info.GetValue("Brush", s); s._xOffset = info.GetDouble("XOffset"); s._yOffset = info.GetDouble("YOffset"); s._rotation = info.GetDouble("Rotation"); s.HorizontalAlignment = (System.Drawing.StringAlignment)info.GetEnum("HorizontalAlignment", typeof(System.Drawing.StringAlignment)); s.VerticalAlignment = (System.Drawing.StringAlignment)info.GetEnum("VerticalAlignment", typeof(System.Drawing.StringAlignment)); bool attachToAxis = info.GetBoolean("AttachToAxis"); EdgeType attachedAxis = (EdgeType)info.GetValue("AttachedAxis", parent); bool whiteOut = info.GetBoolean("WhiteOut"); BrushX backgroundBrush = (BrushX)info.GetValue("BackgroundBrush", s); if (attachToAxis) { s._attachedPlane = GetDirection(attachedAxis); } else { s._attachedPlane = null; } if (whiteOut) { s._backgroundStyle = new FilledRectangle(backgroundBrush.Color); } if (nativeCall) { // restore the cached values s.SetCachedValues(); s.CreateEventChain(); } return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { string val = info.GetNodeContent(); switch (val) { case "NoLine": return(LineConnectionStyles.NoConnection.Instance); case "Straight": return(LineConnectionStyles.StraightConnection.Instance); case "Segment2": return(LineConnectionStyles.Segment2Connection.Instance); case "Segment3": return(LineConnectionStyles.Segment3Connection.Instance); case "Spline": return(LineConnectionStyles.SplineConnection.Instance); case "Bezier": return(LineConnectionStyles.BezierConnection.Instance); case "StepHorz": return(LineConnectionStyles.StepHorizontalConnection.Instance); case "StepVert": return(LineConnectionStyles.StepVerticalConnection.Instance); case "StepHorzCenter": return(LineConnectionStyles.StepHorizontalCenteredConnection.Instance); case "StepVertCenter": return(LineConnectionStyles.StepVerticalCenteredConnection.Instance); default: throw new NotImplementedException(); } }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { int independentVariable = info.GetInt32("IndependentVariable"); var independentVariableTransformation = (IVariantToVariantTransformation)info.GetValue("IndependentVariableTransformation", null); int dependentVariable = info.GetInt32("DependentVariable"); var dependentVariableTransformation = (IVariantToVariantTransformation)info.GetValue("DependentVariableTransformation", null); info.GetArray("ParameterValues", out double[] parameter); object fo = info.GetValue("FitFunction", null); if (fo is Altaxo.Serialization.Xml.AssemblyAndTypeSurrogate) { fo = ((Altaxo.Serialization.Xml.AssemblyAndTypeSurrogate)fo).CreateInstance(); } FitFunctionToScalarFunctionDDWrapper s; if (o == null) { s = new FitFunctionToScalarFunctionDDWrapper(fo as IFitFunction, dependentVariable, dependentVariableTransformation, independentVariable, independentVariableTransformation, parameter); } else { s = (FitFunctionToScalarFunctionDDWrapper)o; s._independentVariable = independentVariable; s._independentVariableTransformation = independentVariableTransformation; s._dependentVariable = dependentVariable; s._dependentVariableTransformation = dependentVariableTransformation; s._parameter = parameter; s._fitFunction = fo as IFitFunction; if (s._fitFunction is Main.IDocumentLeafNode && !(s._fitFunction is Altaxo.Scripting.FitFunctionScript)) { ((Main.IDocumentLeafNode)s._fitFunction).ParentObject = s; } } return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = null != o ? (InverseScale)o : new InverseScale(info); s._cachedAxisOrgInv = info.GetDouble("InvOrg"); s._cachedAxisEndInv = info.GetDouble("InvEnd"); s._cachedAxisSpanInv = s._cachedAxisEndInv - s._cachedAxisOrgInv; s._cachedOneByAxisSpanInv = 1 / s._cachedAxisSpanInv; s._dataBounds = (FiniteNumericalBoundaries)info.GetValue("Bounds", s); s._dataBounds.ParentObject = s; // restore the event chain s._rescaling = (InverseScaleRescaleConditions)info.GetValue("Rescaling", s); s._rescaling.ParentObject = s; s._tickSpacing = (Ticks.TickSpacing)info.GetValue("TickSpacing", s); s._tickSpacing.ParentObject = s; s.UpdateTicksAndOrgEndUsingRescalingObject(); return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = null != o ? (ClipboardRenderingOptions)o : new ClipboardRenderingOptions(); var oldBase = new GraphExportOptions(); info.GetBaseValueEmbedded(oldBase, typeof(GraphExportOptions), parent); var clipboardFormat = (GraphCopyPageClipboardFormat)info.GetEnum("ClipboardFormat", typeof(GraphCopyPageClipboardFormat)); s.SourceDpiResolution = oldBase.SourceDpiResolution; s.OutputScalingFactor = oldBase.SourceDpiResolution / oldBase.DestinationDpiResolution; s.BackgroundBrush = oldBase.BackgroundBrush; s._renderDropFileImageFormat = oldBase.ImageFormat; s._renderDropFileBitmapPixelFormat = oldBase.PixelFormat; s.RenderDropFile = clipboardFormat.HasFlag(GraphCopyPageClipboardFormat.AsDropDownList); s.RenderEmbeddedObject = clipboardFormat.HasFlag(GraphCopyPageClipboardFormat.AsEmbeddedObject); s.RenderLinkedObject = clipboardFormat.HasFlag(GraphCopyPageClipboardFormat.AsLinkedObject); s.RenderEnhancedMetafileAsVectorFormat = !clipboardFormat.HasFlag(GraphCopyPageClipboardFormat.AsNativeWrappedInEnhancedMetafile); return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYFunctionPlotData pa = (XYFunctionPlotData)info.GetValue("Data", typeof(XYColumnPlotData)); XYLineScatterPlotStyle lsps = (XYLineScatterPlotStyle)info.GetValue("Style", typeof(XYLineScatterPlotStyle)); G2DPlotStyleCollection ps = new G2DPlotStyleCollection(); ps.Add(new ScatterPlotStyle(lsps.ScatterStyle)); ps.Add(new LinePlotStyle(lsps.XYPlotLineStyle)); if (null == o) { return(new XYFunctionPlotItem(pa, ps)); } else { XYFunctionPlotItem s = (XYFunctionPlotItem)o; s.Data = pa; s.Style = ps; return(s); } }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = null != o ? (CumulativeProbabilityScale)o : new CumulativeProbabilityScale(info); s._cachedAxisOrg = info.GetDouble("Org"); s._cachedAxisEnd = info.GetDouble("End"); s._cachedAxisQuantileOrg = SquareRootOf2 * Altaxo.Calc.ErrorFunction.InverseErf(-1 + 2 * s._cachedAxisOrg); s._cachedAxisQuantileSpan = SquareRootOf2 * Altaxo.Calc.ErrorFunction.InverseErf(-1 + 2 * s._cachedAxisEnd) - s._cachedAxisOrg; s._dataBounds = (NumericalBoundaries)info.GetValue("Bounds", s); s._dataBounds.ParentObject = s; // restore the event chain s._rescaling = (CumulativeProbabilityScaleRescaleConditions)info.GetValue("Rescaling", s); s._rescaling.ParentObject = s; s._tickSpacing = (Ticks.TickSpacing)info.GetValue("TickSpacing", s); s._tickSpacing.ParentObject = s; s.UpdateTicksAndOrgEndUsingRescalingObject(); return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { var s = null != o ? (GraphViewLayout)o : new GraphViewLayout(); if (info.CurrentElementName == "BaseType") { info.GetString("BaseType"); } s._isAutoZoomActive = info.GetBoolean("AutoZoom"); s._zoomFactor = info.GetSingle("Zoom"); var surr = new XmlSerializationSurrogate0 { _GraphController = s, _PathToGraph = (AbsoluteDocumentPath)info.GetValue("Graph", s) }; info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(surr.EhDeserializationFinished); return(s); }