示例#1
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                DropAreaPlotStyle s = (DropAreaPlotStyle)o ?? new DropAreaPlotStyle(info);

                s._connectionStyle                  = (ILineConnectionStyle)info.GetValue("Connection", s);
                s._connectCircular                  = info.GetBoolean("ConnectCircular");
                s._ignoreMissingDataPoints          = info.GetBoolean("IgnoreMissingDataPoints");
                s._independentOnShiftingGroupStyles = info.GetBoolean("IndependentOnShiftingGroupStyles");

                s._fillDirection = (CSPlaneID)info.GetValue("FillDirection", s);
                s._fillRule      = (FillAreaRule)info.GetEnum("FillRule", typeof(FillAreaRule));
                s._fillBrush     = (BrushX)info.GetValue("FillBrush", s);
                if (null != s._fillBrush)
                {
                    s._fillBrush.ParentObject = s;
                }
                s._fillColorLinkage = (ColorLinkage)info.GetEnum("FillColorLinkage", typeof(ColorLinkage));

                s._framePen = (PenX)info.GetValue("Pen", s);
                if (null != s._framePen)
                {
                    s._framePen.ParentObject = s;
                }
                s._frameColorLinkage = (ColorLinkage)info.GetEnum("FrameColorLinkage", typeof(ColorLinkage));
                return(s);
            }
示例#2
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                AxisLabelStyle s = null != o ? (AxisLabelStyle)o : new AxisLabelStyle(info);

                s._font                   = (FontX)info.GetValue("Font", s);
                s._brush                  = (BrushX)info.GetValue("Brush", s);
                s._backgroundStyle        = (IBackgroundStyle)info.GetValue("Background", 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);
            }
示例#3
0
            protected virtual InverseTickSpacing SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                InverseTickSpacing s = null != o ? (InverseTickSpacing)o : new InverseTickSpacing();

                s._orgGrace      = info.GetDouble("MinGrace");
                s._endGrace      = info.GetDouble("MaxGrace");
                s._snapOrgToTick = (BoundaryTickSnapping)info.GetEnum("SnapOrgToTick", typeof(BoundaryTickSnapping));
                s._snapEndToTick = (BoundaryTickSnapping)info.GetEnum("SnapEndToTick", typeof(BoundaryTickSnapping));

                s._targetNumberOfMajorTicks = info.GetInt32("TargetNumberOfMajorTicks");
                s._targetNumberOfMinorTicks = info.GetInt32("TargetNumberOfMinorTicks");
                s._userDefinedMajorSpan     = info.GetNullableDouble("UserDefinedMajorSpan");
                s._userDefinedMinorTicks    = info.GetNullableInt32("UserDefinedMinorTicks");

                s._transformationOffset              = info.GetDouble("TransformationOffset");
                s._transformationDivider             = info.GetDouble("TransformationDivider");
                s._transformationOperationIsMultiply = info.GetBoolean("TransformationIsMultiply");

                s.ChildSetMember(ref s._suppressedMajorTicks, (SuppressedTicks)info.GetValue("SuppressedMajorTicks", s));
                s.ChildSetMember(ref s._suppressedMinorTicks, (SuppressedTicks)info.GetValue("SuppressedMinorTicks", s));
                s.ChildSetMember(ref s._additionalMajorTicks, (AdditionalTicks)info.GetValue("AdditionalMajorTicks", s));
                s.ChildSetMember(ref s._additionalMinorTicks, (AdditionalTicks)info.GetValue("AdditionalMinorTicks", s));

                if (s._suppressedMajorTicks == null)
                {
                    s._suppressedMajorTicks = new SuppressedTicks()
                    {
                        ParentObject = s
                    }
                }
                ;
                if (s._suppressedMinorTicks == null)
                {
                    s._suppressedMinorTicks = new SuppressedTicks()
                    {
                        ParentObject = s
                    }
                }
                ;

                if (s._additionalMajorTicks == null)
                {
                    s._additionalMajorTicks = new AdditionalTicks()
                    {
                        ParentObject = s
                    }
                }
                ;
                if (s._additionalMinorTicks == null)
                {
                    s._additionalMinorTicks = new AdditionalTicks()
                    {
                        ParentObject = s
                    }
                }
                ;

                return(s);
            }
        }
示例#4
0
            protected virtual LinearTickSpacing SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinearTickSpacing s = null != o ? (LinearTickSpacing)o : new LinearTickSpacing();

                s._zeroLever     = info.GetDouble("ZeroLever");
                s._orgGrace      = info.GetDouble("MinGrace");
                s._endGrace      = info.GetDouble("MaxGrace");
                s._snapOrgToTick = (BoundaryTickSnapping)info.GetEnum("SnapOrgToTick", typeof(BoundaryTickSnapping));
                s._snapEndToTick = (BoundaryTickSnapping)info.GetEnum("SnapEndToTick", typeof(BoundaryTickSnapping));

                s._targetNumberOfMajorTicks = info.GetInt32("TargetNumberOfMajorTicks");
                s._targetNumberOfMinorTicks = info.GetInt32("TargetNumberOfMinorTicks");
                s._userDefinedMajorSpan     = info.GetNullableDouble("UserDefinedMajorSpan");
                s._userDefinedMinorTicks    = info.GetNullableInt32("UserDefinedMinorTicks");

                s._transformationOffset              = info.GetDouble("TransformationOffset");
                s._transformationDivider             = info.GetDouble("TransformationDivider");
                s._transformationOperationIsMultiply = info.GetBoolean("TransformationIsMultiply");

                s.SuppressedMajorTicks = (SuppressedTicks)info.GetValue("SuppressedMajorTicks", s);
                s.SuppressedMinorTicks = (SuppressedTicks)info.GetValue("SuppressedMinorTicks", s);
                s.AdditionalMajorTicks = (AdditionalTicks)info.GetValue("AdditionalMajorTicks", s);
                s.AdditionalMinorTicks = (AdditionalTicks)info.GetValue("AdditionalMinorTicks", s);

                return(s);
            }
示例#5
0
            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));
                s.AttachedAxis        = (CSPlaneID)info.GetValue("AttachedAxis", s);
                s._backgroundStyle    = (IBackgroundStyle)info.GetValue("Background", s);
                s._labelColumn        = (Altaxo.Data.ReadableColumnProxy)info.GetValue("LabelColumn", parent);


                if (nativeCall)
                {
                    // restore the cached values
                    s.SetCachedValues();
                    s.CreateEventChain();
                }

                return(s);
            }
示例#6
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                NumericScaleRescaleConditions s = null != o ? (NumericScaleRescaleConditions)o : new LinearScaleRescaleConditions();

                s._userProvidedOrgRelativeTo = BoundariesRelativeTo.Absolute;
                s._userProvidedEndRelativeTo = BoundariesRelativeTo.Absolute;

                var orgRescaling  = (BoundaryRescaling)(int)info.GetEnum("OrgRescaling", typeof(BoundaryRescalingV1));
                var org           = info.GetDouble("Org");
                var endRescaling  = (BoundaryRescaling)(int)info.GetEnum("EndRescaling", typeof(BoundaryRescalingV1));
                var end           = info.GetDouble("End");
                var spanRescaling = (BoundaryRescaling)(int)info.GetEnum("SpanRescaling", typeof(BoundaryRescalingV1));
                var span          = info.GetDouble("Span");

                if (4 == (int)orgRescaling)
                {
                    orgRescaling = BoundaryRescaling.Auto;
                }
                if (4 == (int)endRescaling)
                {
                    endRescaling = BoundaryRescaling.Auto;
                }

                s._orgRescaling         = orgRescaling;
                s._endRescaling         = endRescaling;
                s._userProvidedOrgValue = org;
                s._userProvidedEndValue = end;

                s._resultingOrg = org;
                s._resultingEnd = end;

                return(s);
            }
示例#7
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                FloatingScale s = null != o ? (FloatingScale)o : new FloatingScale(info);

                info.GetBaseValueEmbedded(s, typeof(FloatingScale).BaseType, parent);

                s._scaleNumber      = info.GetInt32("ScaleNumber");
                s._scaleSpanType    = (FloatingScaleSpanType)info.GetEnum("ScaleSpanType", typeof(FloatingScaleSpanType));
                s._scaleSpanValue   = info.GetDouble("ScaleSpanValue");
                s._scaleSegmentType = (ScaleSegmentType)info.GetEnum("ScaleType", typeof(ScaleSegmentType));

                s._tickSpacing = (TickSpacing)info.GetValue("TickSpacing", s);
                if (null != s._tickSpacing)
                {
                    s._tickSpacing.ParentObject = s;
                }

                s._axisStyle = (AxisStyle)info.GetValue("AxisStyle", s);
                if (null != s._axisStyle)
                {
                    s._axisStyle.ParentObject = s;
                }

                s._background = (IBackgroundStyle)info.GetValue("Background", s);
                if (null != s._background)
                {
                    s._background.ParentObject = s;
                    s._backgroundPadding       = (Margin2D)info.GetValue("BackgroundPadding", s);
                }

                return(s);
            }
示例#8
0
            protected virtual DecomposeByColumnContentOptions SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = o as DecomposeByColumnContentOptions ?? new DecomposeByColumnContentOptions();

                s._destinationOutput        = (OutputFormat)info.GetEnum("DestinationOutput", typeof(OutputFormat));
                s._destinationColumnSorting = (OutputSorting)info.GetEnum("DestinationColumnSorting", typeof(OutputSorting));

                return(s);
            }
示例#9
0
            public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                ArrheniusLaw s = o != null ? (ArrheniusLaw)o : new ArrheniusLaw();

                s._temperatureUnitOfX         = (TemperatureRepresentation)info.GetEnum("IndependentVariableUnit", typeof(TemperatureRepresentation));
                s._dependentVariableTransform = (TransformedValueRepresentation)info.GetEnum("DependentVariableTransform", typeof(TransformedValueRepresentation));
                s._paramEnergyUnit            = (EnergyRepresentation)info.GetEnum("ParamEnergyUnit", typeof(EnergyRepresentation));

                return(s);
            }
示例#10
0
            public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                VogelFulcherLaw s = o != null ? (VogelFulcherLaw)o : new VogelFulcherLaw();

                s._temperatureUnitOfX         = (TemperatureRepresentation)info.GetEnum("IndependentVariableUnit", typeof(TemperatureRepresentation));
                s._dependentVariableTransform = (TransformedValueRepresentation)info.GetEnum("DependentVariableTransform", typeof(TransformedValueRepresentation));
                s._temperatureUnitOfB         = (TemperatureRepresentation)info.GetEnum("ParamBUnit", typeof(TemperatureRepresentation));
                s._temperatureUnitOfT0        = (TemperatureRepresentation)info.GetEnum("ParamT0Unit", typeof(TemperatureRepresentation));

                return(s);
            }
示例#11
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = null != o ? (TextureScaling)o : new TextureScaling();

                s._scalingMode      = (TextureScalingMode)info.GetEnum("Mode", typeof(TextureScalingMode));
                s._aspectPreserving = (AspectRatioPreservingMode)info.GetEnum("AspectPreserving", typeof(AspectRatioPreservingMode));
                s._x = info.GetDouble("X");
                s._y = info.GetDouble("Y");

                return(s);
            }
示例#12
0
            protected virtual ExpandCyclingVariableColumnOptions SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = (o == null ? new ExpandCyclingVariableColumnOptions() : (ExpandCyclingVariableColumnOptions)o);

                s._destinationX             = (DestinationXColumn)info.GetEnum("DestinationX", typeof(DestinationXColumn));
                s._destinationOutput        = (OutputFormat)info.GetEnum("DestinationOutput", typeof(OutputFormat));
                s._destinationColumnSorting = (OutputSorting)info.GetEnum("DestinationColumnSorting", typeof(OutputSorting));
                s._destinationRowSorting    = (OutputSorting)info.GetEnum("DestinationRowSorting", typeof(OutputSorting));

                return(s);
            }
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                NumericAxisRescaleConditions s = null != o ? (NumericAxisRescaleConditions)o : new NumericAxisRescaleConditions();

                s._orgRescaling  = (BoundaryRescaling)info.GetEnum("OrgRescaling", typeof(BoundaryRescaling));
                s._org           = (double)info.GetDouble("Org");
                s._endRescaling  = (BoundaryRescaling)info.GetEnum("EndRescaling", typeof(BoundaryRescaling));
                s._end           = (double)info.GetDouble("End");
                s._spanRescaling = (BoundaryRescaling)info.GetEnum("SpanRescaling", typeof(BoundaryRescaling));
                s._span          = (double)info.GetDouble("Span");
                return(s);
            }
示例#14
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                DateTimeAxisRescaleConditions s = null != o ? (DateTimeAxisRescaleConditions)o : new DateTimeAxisRescaleConditions();

                s._orgRescaling  = (BoundaryRescaling)info.GetEnum("OrgRescaling", typeof(BoundaryRescaling));
                s._org           = info.GetDateTime("Org");
                s._endRescaling  = (BoundaryRescaling)info.GetEnum("EndRescaling", typeof(BoundaryRescaling));
                s._end           = info.GetDateTime("End");
                s._spanRescaling = (BoundaryRescaling)info.GetEnum("SpanRescaling", typeof(BoundaryRescaling));
                s._span          = info.GetTimeSpan("Span");
                return(s);
            }
示例#15
0
            protected virtual RealFourierTransformation2DOptions SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = (o == null ? new RealFourierTransformation2DOptions() : (RealFourierTransformation2DOptions)o);

                s._isUserDefinedRowIncrementValue = info.GetBoolean("IsUserDefinedRowIncrementValue");
                s._rowIncrementValue = info.GetDouble("RowIncrementValue");
                s._isUserDefinedColumnIncrementValue = info.GetBoolean("IsUserDefinedColumnIncrementValue");
                s._columnIncrementValue = info.GetDouble("ColumnIncrementValue");
                s._replacementValueForNaNMatrixElements      = info.GetNullableDouble("ReplacementValueForNaNMatrixElements");
                s._replacementValueForInfiniteMatrixElements = info.GetNullableDouble("ReplacementValueForInfiniteMatrixElements");
                s._dataPretreatmentCorrectionOrder           = info.GetNullableInt32("DataPretreatmentCorrectionOrder");
                s._fourierWindow = (Altaxo.Calc.Fourier.Windows.IWindows2D)info.GetValue("FourierWindow", s);

                s._kindOfOutputResult      = (RealFourierTransformationOutputKind)info.GetEnum("KindOfOutputResult", typeof(RealFourierTransformationOutputKind));
                s._centerResult            = info.GetBoolean("CenterResult");
                s._resultFractionOfRows    = info.GetDouble("ResultFractionOfRows");
                s._resultFractionOfColumns = info.GetDouble("ResultFractionOfColumns");

                s._outputFrequencyHeaderColumns    = info.GetBoolean("OutputFrequencyHeaderColumns");
                s._frequencyRowHeaderColumnName    = info.GetString("FrequencyRowHeaderColumnName");
                s._frequencyColumnHeaderColumnName = info.GetString("FrequencyColumnHeaderColumnName");

                s._outputPeriodHeaderColumns    = info.GetBoolean("OutputPeriodHeaderColumns");
                s._periodRowHeaderColumnName    = info.GetString("PeriodRowHeaderColumnName");
                s._periodColumnHeaderColumnName = info.GetString("PeriodColumnHeaderColumnName");

                return(s);
            }
示例#16
0
文件: Variant.cs 项目: olesar/Altaxo
            protected virtual AltaxoVariant SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                AltaxoVariant s = (o == null ? new AltaxoVariant() : (AltaxoVariant)o);
                var           c = (Content)info.GetEnum("Content", typeof(Content));

                s._typeOfContent = c;

                switch (c)
                {
                case Content.VNull:
                    break;

                case Content.VDouble:
                    s._double = info.GetDouble("Value");
                    break;

                case Content.VDateTime:
                    s._object = info.GetDateTime("Value");
                    break;

                case Content.VString:
                    s._object = info.GetString("Value");
                    break;

                default:
                    s._object = info.GetValue("Value", s);
                    break;
                }

                return(s);
            }
示例#17
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = null != o ? (TextDocumentViewOptions)o : new TextDocumentViewOptions(info);

                var pathToDocument = (AbsoluteDocumentPath)info.GetValue("Document", s);

                s.WindowConfiguration = (ViewerConfiguration)info.GetEnum("WindowConfiguration", typeof(ViewerConfiguration));
                s.IsViewerSelected    = info.GetBoolean("IsViewerSelected");
                s._fractionOfSourceEditorWindowVisible = info.GetDouble("FractionSourceEditor");
                s.IsWordWrappingEnabled  = info.GetNullableBoolean("IsWordWrappingEnabled");
                s.IsLineNumberingEnabled = info.GetNullableBoolean("IsLineNumberingEnabled");
                s.IsSpellCheckingEnabled = info.GetNullableBoolean("IsSpellCheckingEnabled");
                s.IsFoldingEnabled       = info.GetNullableBoolean("IsFoldingEnabled");
                s.HighlightingStyle      = info.GetString("HighlightingStyle");
                if (info.CurrentElementName == "IsOutlineWindowVisible")
                {
                    s.IsOutlineWindowVisible     = info.GetNullableBoolean("IsOutlineWindowVisible");
                    s.OutlineWindowRelativeWidth = info.GetNullableDouble("OutlineWindowRelativeWidth");
                }

                var surr = new XmlSerializationSurrogate0
                {
                    _deserializedInstance = s,
                    _pathToDocument       = pathToDocument,
                };

                info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(surr.EhDeserializationFinished);

                return(s);
            }
示例#18
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinePlotStyle s = null != o ? (LinePlotStyle)o : new LinePlotStyle(info);

                s._linePen                 = (PenX)info.GetValue("Pen", s);
                s.Connection               = (ILineConnectionStyle)info.GetValue("Connection", s);
                s._useSymbolGap            = info.GetBoolean("LineSymbolGap");
                s._ignoreMissingDataPoints = info.GetBoolean("IgnoreMissingPoints");
                bool fillArea  = info.GetBoolean("FillArea");
                var  fillBrush = (BrushX)info.GetValue("FillBrush", s);
                var  fillDir   = (CSPlaneID)info.GetValue("FillDirection", s);

                s._independentColor = info.GetBoolean("IndependentColor");
                var fillColorLinkage = (ColorLinkage)info.GetEnum("FillColorLinkage", typeof(ColorLinkage));

                s._connectCircular = info.GetBoolean("ConnectCircular");

                if (!fillArea)
                {
                    return(s);
                }
                else
                {
                    var drop = new DropAreaPlotStyle(s.Connection, s.IgnoreMissingDataPoints, false, fillDir, fillBrush, fillColorLinkage);
                    return(new object[] { s, drop });
                }
            }
示例#19
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var    colorSetLevel = (Altaxo.Main.ItemDefinitionLevel)info.GetEnum("Level", typeof(Altaxo.Main.ItemDefinitionLevel));
                string colorSetName  = info.GetString("Name");

                return(new ColorSetIdentifier(colorSetLevel, colorSetName));
            }
示例#20
0
            protected virtual PenX3D SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var material     = (IMaterial)info.GetValue("Material", null);
                var crossSection = (ICrossSectionOfLine)info.GetValue("CrossSection", null);

                var    lineJoin   = (PenLineJoin)info.GetEnum("LineJoin", typeof(PenLineJoin));
                double miterLimit = info.GetDouble("MiterLimit");

                var lineStartCap = ("LineStartCap" == info.CurrentElementName) ? (ILineCap)info.GetValue("LineStartCap", null) : null;
                var lineEndCap   = ("LineEndCap" == info.CurrentElementName) ? (ILineCap)info.GetValue("LineEndCap", null) : null;
                var dashPattern  = ("DashPattern" == info.CurrentElementName) ? (IDashPattern)info.GetValue("DashPattern", null) : null;

                dashPattern = dashPattern ?? DashPatterns.Solid.Instance;
                ILineCap dashStartCap = null, dashEndCap = null;
                bool     dashStartCapSuppression = false, dashEndCapSuppression = false;

                if (!DashPatterns.Solid.Instance.Equals(dashPattern))
                {
                    if ("DashStartCap" == info.CurrentElementName)
                    {
                        dashStartCap            = (ILineCap)info.GetValue("DashStartCap", null);
                        dashStartCapSuppression = info.GetBoolean("DashStartCapSuppression");
                    }

                    if ("DashEndCap" == info.CurrentElementName)
                    {
                        dashEndCap            = (ILineCap)info.GetValue("DashEndCap", null);
                        dashEndCapSuppression = info.GetBoolean("DashEndCapSuppression");
                    }
                }

                return(new PenX3D(material, crossSection, lineJoin, miterLimit, lineStartCap, lineEndCap, dashPattern, dashStartCap, dashStartCapSuppression, dashEndCap, dashEndCapSuppression));
            }
示例#21
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                DensityImagePlotStyle s = null != o ? (DensityImagePlotStyle)o : new DensityImagePlotStyle();

                var scalingStyle = (ScalingStyle)info.GetEnum("ScalingStyle", typeof(ScalingStyle));
                var vRangeFrom   = info.GetDouble("RangeFrom");
                var vRangeTo     = info.GetDouble("RangeTo");

                s._clipToLayer = info.GetBoolean("ClipToLayer");
                var colorBelow   = (NamedColor)info.GetValue("ColorBelow", s);
                var colorAbove   = (NamedColor)info.GetValue("ColorAbove", s);
                var colorInvalid = (NamedColor)info.GetValue("ColorInvalid", s);

                var colorProvider = ColorProviderBGMYR.NewFromColorBelowAboveInvalidAndTransparency(colorBelow, colorAbove, colorInvalid, 0);
                var scale         = scalingStyle == ScalingStyle.Logarithmic ? new Log10Scale() : (NumericalScale) new LinearScale();

                scale.Rescaling.SetUserParameters(
                    double.IsNaN(vRangeFrom) ? Altaxo.Graph.Scales.Rescaling.BoundaryRescaling.Auto : Altaxo.Graph.Scales.Rescaling.BoundaryRescaling.Fixed,
                    vRangeFrom,
                    double.IsNaN(vRangeTo) ? Altaxo.Graph.Scales.Rescaling.BoundaryRescaling.Auto : Altaxo.Graph.Scales.Rescaling.BoundaryRescaling.Fixed,
                    vRangeTo);

                s.Scale         = scale;
                s.ColorProvider = colorProvider;

                return(s);
            }
示例#22
0
                public override PlotGroupMemento SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
                {
                    PlotGroupMemento s = base.SDeserialize(o, info, parent);

                    s._concurrently        = info.GetBoolean("Concurrently");
                    s._plotGroupStrictness = (PlotGroupStrictness)info.GetEnum("Strict", typeof(PlotGroupStrictness));

                    return(s);
                }
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = null != o ? (ItemLocationDirectAspectPreserving)o : new ItemLocationDirectAspectPreserving();

                s._originalItemSize = (PointD2D)info.GetValue("OriginalSize", s);
                s._aspectPreserving = (AspectRatioPreservingMode)info.GetEnum("AspectPreserving", s._aspectPreserving.GetType());
                info.GetBaseValueEmbedded(s, typeof(ItemLocationDirectAspectPreserving).BaseType, parent);
                return(s);
            }
            protected virtual XYPlotLayerPositionAndSize SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                XYPlotLayerPositionAndSize s = null != o ? (XYPlotLayerPositionAndSize)o : new XYPlotLayerPositionAndSize();

                s._layerWidth      = info.GetDouble("Width");
                s._layerWidthType  = (XYPlotLayerSizeType)info.GetEnum("WidthType", typeof(XYPlotLayerSizeType));
                s._layerHeight     = info.GetDouble("Height");
                s._layerHeightType = (XYPlotLayerSizeType)info.GetEnum("HeightType", typeof(XYPlotLayerSizeType));
                s._layerAngle      = info.GetDouble("Angle");
                s._layerScale      = info.GetDouble("Scale");

                s._layerXPosition     = info.GetDouble("XPos");
                s._layerXPositionType = (XYPlotLayerPositionType)info.GetEnum("XPosType", typeof(XYPlotLayerPositionType));
                s._layerYPosition     = info.GetDouble("YPos");
                s._layerYPositionType = (XYPlotLayerPositionType)info.GetEnum("YPosType", typeof(XYPlotLayerPositionType));

                return(s);
            }
示例#25
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = (ColumnStyle)o;

                if ("Size" == info.CurrentElementName)
                {
                    return(new XmlSerializationSurrogate0().Deserialize(o, info, parent));
                }

                s._columnStyleType      = (ColumnStyleType)info.GetEnum("Type", typeof(ColumnStyleType));
                s._columnSize           = (int)info.GetSingle("Size");
                s._textFormat.Alignment = (StringAlignment)Enum.Parse(typeof(StringAlignment), info.GetString("Alignment"));
                s._isCellPenCustom      = info.GetBoolean("CustomPen");
                if (s._isCellPenCustom)
                {
                    s.CellBorder = (PenX)info.GetValue("Pen", s);
                }
                else
                {
                    s.SetDefaultCellBorder();
                }

                s._isTextBrushCustom = info.GetBoolean("CustomText");
                if (s._isTextBrushCustom)
                {
                    s.TextBrush = (BrushX)info.GetValue("TextBrush", s);
                }
                else
                {
                    s.SetDefaultTextBrush();
                }

                s._isBackgroundBrushCustom = info.GetBoolean("CustomBkg");
                if (s._isBackgroundBrushCustom)
                {
                    s.BackgroundBrush = (BrushX)info.GetValue("BkgBrush", s);
                }
                else
                {
                    s.SetDefaultBackgroundBrush();
                }

                bool isCustomFont = info.GetBoolean("CustomFont");

                if (isCustomFont)
                {
                    s.TextFont = (FontX)info.GetValue("Font", s);
                }
                else
                {
                    s.SetDefaultTextFont();
                }

                s.ParentObject = (Main.IDocumentNode)parent;
                return(s);
            }
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = (MultiLineLabelFormattingBase)o;

                info.GetBaseValueEmbedded(s, typeof(LabelFormattingBase), parent);
                s._relativeLineSpacing = info.GetDouble("LineSpacing");
                s._textBlockAlignment  = (StringAlignment)info.GetEnum("BlockAlignment", typeof(StringAlignment));

                return(s);
            }
示例#27
0
            protected virtual DataSourceImportOptions SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = (o == null ? new DataSourceImportOptions() : (DataSourceImportOptions)o);

                s._importTriggerSource           = (Data.ImportTriggerSource)info.GetEnum("ImportTriggerSource", s._importTriggerSource.GetType());
                s._executeTableScriptAfterImport = info.GetBoolean("ExecuteTableScriptAfterImport");
                s._doNotSaveCachedTableData      = info.GetBoolean("DoNotSaveCachedTableData");
                s._minimumWaitingTimeAfterUpdate = info.GetDouble("MinimumTimeIntervalBetweenUpdatesInSeconds");
                s._maximumWaitingTimeAfterUpdate = info.GetDouble("PollTimeIntervalInSeconds");
                return(s);
            }
示例#28
0
            protected virtual ConvertXYVToMatrixOptions SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                var s = o as ConvertXYVToMatrixOptions ?? new ConvertXYVToMatrixOptions();

                s._outputAveraging = (OutputAveraging)info.GetEnum("Averaging", typeof(OutputAveraging));
                s._outputNaming    = (OutputNaming)info.GetEnum("ColumnNaming", typeof(OutputNaming));
                s._outputColumnNameFormatString = info.GetString("ColumnNamingFormatting");

                s._destinationXColumnSorting = (SortDirection)info.GetEnum("DestinationXColumnSorting", typeof(SortDirection));
                s._useClusteringForX         = info.GetBoolean("UseClusteringForX");
                s._numberOfClustersX         = info.GetNullableInt32("NumberOfClustersX");
                s._createStdDevX             = info.GetBoolean("CreateStdDevX");

                s._destinationYColumnSorting = (SortDirection)info.GetEnum("DestinationYColumnSorting", typeof(SortDirection));
                s._useClusteringForY         = info.GetBoolean("UseClusteringForY");
                s._numberOfClustersY         = info.GetNullableInt32("NumberOfClustersY");
                s._createStdDevY             = info.GetBoolean("CreateStdDevY");

                return(s);
            }
示例#29
0
            protected virtual VectorCartesicPlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                VectorCartesicPlotStyle s = null != o ? (VectorCartesicPlotStyle)o : new VectorCartesicPlotStyle(info);

                s._meaningOfValues = (ValueInterpretation)info.GetEnum("MeaningOfValues", typeof(ValueInterpretation));

                s._columnX = (IReadableColumnProxy)info.GetValue("ColumnX", s);
                if (null != s._columnX)
                {
                    s._columnX.ParentObject = s;
                }

                s._columnY = (IReadableColumnProxy)info.GetValue("ColumnY", s);
                if (null != s._columnY)
                {
                    s._columnY.ParentObject = s;
                }

                s._columnZ = (INumericColumnProxy)info.GetValue("ColumnZ", s);
                if (null != s._columnZ)
                {
                    s._columnZ.ParentObject = s;
                }

                s._independentSkipFrequency = info.GetBoolean("IndependentSkipFreq");
                s._skipFrequency            = info.GetInt32("SkipFreq");

                s._useManualVectorLength = info.GetBoolean("UseManualVectorLength");
                s._vectorLengthOffset    = info.GetDouble("VectorLengthOffset");
                s._vectorLengthFactor    = info.GetDouble("VectorLengthFactor");

                s._independentSymbolSize = info.GetBoolean("IndependentSymbolSize");
                s._symbolSize            = info.GetDouble("SymbolSize");

                s.Pen = (PenX3D)info.GetValue("Pen", s);
                s._independentColor = info.GetBoolean("IndependentColor");

                s._lineWidth1Offset = info.GetDouble("LineWidth1Offset");
                s._lineWidth1Factor = info.GetDouble("LineWidth1Factor");

                s._lineWidth2Offset = info.GetDouble("LineWidth2Offset");
                s._lineWidth2Factor = info.GetDouble("LineWidth2Factor");

                s._endCapSizeOffset = info.GetDouble("EndCapSizeOffset");
                s._endCapSizeFactor = info.GetDouble("EndCapSizeFactor");

                s._useSymbolGap    = info.GetBoolean("UseSymbolGap");
                s._symbolGapOffset = info.GetDouble("SymbolGapOffset");
                s._symbolGapFactor = info.GetDouble("SymbolGapFactor");

                s._independentOnShiftingGroupStyles = info.GetBoolean("IndependentOnShiftingGroupStyles");

                return(s);
            }
示例#30
0
            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);
            }
        }