Beispiel #1
0
      public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {
        
        Log10Scale s = null!=o ? (Log10Scale)o : new Log10Scale();

        s._log10Org = (double)info.GetDouble("Log10Org");
        s._log10End = (double)info.GetDouble("Log10End");

        s._decadesPerMajorTick = (int)info.GetInt32("DecadesPerMajor");

        bool AxisOrgFixed = (bool)info.GetBoolean("OrgFixed");
        bool AxisEndFixed = (bool)info.GetBoolean("EndFixed");

        s._dataBounds = (PositiveFiniteNumericalBoundaries)info.GetValue("Bounds",typeof(PositiveFiniteNumericalBoundaries));
    
        s._dataBounds.BoundaryChanged += new BoundaryChangedHandler(s.OnBoundariesChanged);


        s._rescaling = new LogarithmicAxisRescaleConditions();
        s._rescaling.SetOrgAndEnd(AxisOrgFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.Org, AxisEndFixed ? BoundaryRescaling.Fixed:BoundaryRescaling.Auto, s.End);

        LogarithmicAxisRescaleConditions rescaling = new LogarithmicAxisRescaleConditions();
        rescaling.SetOrgAndEnd(AxisOrgFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.Org, AxisEndFixed ? BoundaryRescaling.Fixed:BoundaryRescaling.Auto, s.End);
        s._rescaling = rescaling;

        return s;
      }
 public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
 {
   KohlrauschSusceptibility s = o != null ? (KohlrauschSusceptibility)o : new KohlrauschSusceptibility();
   s._useFrequencyInsteadOmega = info.GetBoolean("UseFrequency");
   s._useFlowTerm = info.GetBoolean("FlowTerm");
   s._isDielectricData = info.GetBoolean("IsDielectric");
   return s;
 }
			public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				HavriliakNegamiModulusRelaxation s = o != null ? (HavriliakNegamiModulusRelaxation)o : new HavriliakNegamiModulusRelaxation();
				s._useFrequencyInsteadOmega = info.GetBoolean("UseFrequency");
				s._useFlowTerm = info.GetBoolean("FlowTerm");
				s._logarithmizeResults = info.GetBoolean("LogarithmizeResults");

				return s;
			}
			public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				HavriliakNegamiSusceptibility s = o != null ? (HavriliakNegamiSusceptibility)o : new HavriliakNegamiSusceptibility();
				s._useFrequencyInsteadOmega = info.GetBoolean("UseFrequency");
				info.GetBoolean("NegImSign");
				s._useFlowTerm = !info.GetBoolean("ExcludeConductivity");
				s._isDielectricData = true;
				return s;
			}
			public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				KohlrauschModulusRelaxation s = o != null ? (KohlrauschModulusRelaxation)o : new KohlrauschModulusRelaxation();
				s._useFrequencyInsteadOmega = info.GetBoolean("UseFrequency");
				s._useFlowTerm = info.GetBoolean("FlowTerm");
				s._logarithmizeResults = info.GetBoolean("LogarithmizeResults");
				//s._isDielectricData = info.GetBoolean("IsDielectric");
				return s;
			}
      protected virtual G2DCartesicCoordinateSystem SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {
        G2DCartesicCoordinateSystem s = (o == null ? new G2DCartesicCoordinateSystem() : (G2DCartesicCoordinateSystem)o);

        s.IsXYInterchanged = info.GetBoolean("XYInterchanged");
        s._isXreverse = info.GetBoolean("XReverse");
        s._isYreverse = info.GetBoolean("YReverse");

        return s;
      }
Beispiel #7
0
			protected virtual SpanTickSpacing SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = null != o ? (SpanTickSpacing)o : new SpanTickSpacing();

				s._showRatioEndOrg = info.GetBoolean("ShowRatioEndOrg");
				s._relTickPosition = info.GetDouble("RelTickPosition");

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

				return s;
			}
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var lower = (AltaxoVariant)info.GetValue("LowerValue", parent);
				var isLowerInclusive = info.GetBoolean("LowerIsInclusive");

				var upper = (AltaxoVariant)info.GetValue("UpperValue", parent);
				var isUpperInclusive = info.GetBoolean("UppperIsInclusive");

				var columnProxy = (IReadableColumnProxy)info.GetValue("Column", parent);

				return new RangeOfNumericalValues(info, lower, isLowerInclusive, upper, isUpperInclusive, columnProxy);
			}
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				DateTimeLabelFormatting s = (DateTimeLabelFormatting)o ?? new DateTimeLabelFormatting();
				info.GetBaseValueEmbedded(s, typeof(MultiLineLabelFormattingBase), parent);

				s._timeConversion = (DateTimeLabelFormatting.TimeConversion)info.GetEnum("TimeConversion", typeof(DateTimeLabelFormatting.TimeConversion));
				s._formatString = info.GetString("FormatString");
				s._showAlternateFormattingAtMidnight = info.GetBoolean("ShowAlternateFormattingAtMidnight");
				s._showAlternateFormattingAtNoon = info.GetBoolean("ShowAlternateFormattingAtNoon");
				s._formatStringAlternate = info.GetString("FormatStringAlternate");

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

				s._sourceDpiResolution = info.GetDouble("SourceResolution");
				s._backgroundColorForFormatsWithoutAlphaChannel = (NamedColor)info.GetValue("BackgroundForFormatsWithoutAlphaChannel", s);
				s.BackgroundBrush = (BrushX)info.GetValue("Background", s);
				s._renderEnhancedMetafile = info.GetBoolean("RenderEnhancedMetafile");
				s._renderEnhancedMetafileAsVectorFormat = info.GetBoolean("RenderEnhancedMetafileAsVectorFormat");
				s._renderWindowsMetafile = info.GetBoolean("RenderWindowsMetafile");
				s._renderBitmap = info.GetBoolean("RenderBitmap");

				return s;
			}
Beispiel #11
0
			public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				KohlrauschDecay s = o != null ? (KohlrauschDecay)o : new KohlrauschDecay();
				s.NumberOfRelaxations = info.GetInt32("NumberOfRelaxations");
				s._logarithmizeResult = info.GetBoolean("LogarithmizeResult");
				return s;
			}
 public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
 {
   
   bool rel = info.GetBoolean("IsRelative");
   double val = info.GetDouble("Value");
   return new RelativeOrAbsoluteValue(val,rel);
 }
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				NumericLabelFormattingScientific s = null != o ? (NumericLabelFormattingScientific)o : new NumericLabelFormattingScientific();
				info.GetBaseValueEmbedded(s, typeof(NumericLabelFormattingBase), parent);
				s._showExponentAlways = info.GetBoolean("ShowExponentAlways");
				return s;
			}
Beispiel #14
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (ImageGraphic)o;
				info.GetBaseValueEmbedded(s, typeof(ImageGraphic).BaseType, parent);
				s._isSizeCalculationBasedOnSourceSize = info.GetBoolean("SizeBasedOnSourceSize");

				return s;
			}
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				ScatterSymbolGroupStyle s = null != o ? (ScatterSymbolGroupStyle)o : new ScatterSymbolGroupStyle();
				s._isStepEnabled = info.GetBoolean("StepEnabled");
				s._listOfValues = ScatterSymbolListManager.Instance.OldSolid;
				s._value = s._listOfValues[0];

				return s;
			}
Beispiel #16
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (DirectionalLight)o ?? new DirectionalLight(info);
				s._isAffixedToCamera = info.GetBoolean("IsAffixedToCamera");
				s._lightAmplitude = info.GetDouble("LightAmplitude");
				s._color = (NamedColor)info.GetValue("Color", s);
				s._directionToLight = (VectorD3D)info.GetValue("DirectionToLight", s);
				return s;
			}
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = null != o ? (ClipboardRenderingOptions)o : new ClipboardRenderingOptions();

				info.GetBaseValueEmbedded(s, s.GetType().BaseType, parent);

				s._renderDropFile = info.GetBoolean("RenderDropFile");
				if (s._renderDropFile)
				{
					s._renderDropFileImageFormat = (ImageFormat)info.GetValue("DropFileImageFormat", s);
					s._renderDropFileBitmapPixelFormat = (PixelFormat)info.GetEnum("DropFilePixelFormat", typeof(PixelFormat));
				}

				s._renderEmbeddedObject = info.GetBoolean("RenderEmbeddedObject");
				s._renderLinkedObject = info.GetBoolean("RenderLinkedObject");

				return s;
			}
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (HemisphericAmbientLight)o ?? new HemisphericAmbientLight(info);
				s._isAffixedToCamera = info.GetBoolean("IsAffixedToCamera");
				s._lightAmplitude = info.GetDouble("LightAmplitude");
				s._colorBelow = (NamedColor)info.GetValue("ColorBelow", s);
				s._colorAbove = (NamedColor)info.GetValue("ColorAbove", s);
				s._directionBelowToAbove = (VectorD3D)info.GetValue("DirectionBelowToAbove", s);
				return s;
			}
Beispiel #19
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				WaterfallTransform s = null != o ? (WaterfallTransform)o : new WaterfallTransform();
				s._scaleXInc = info.GetDouble("XScale");
				s._scaleYInc = info.GetDouble("YScale");
				s._useClipping = info.GetBoolean("UseClipping");
				s._xinc = info.GetDouble("XInc");
				s._yinc = info.GetDouble("YInc");
				return s;
			}
Beispiel #20
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (PointLight)o ?? new PointLight(info);
				s._isAffixedToCamera = info.GetBoolean("IsAffixedToCamera");
				s._lightAmplitude = info.GetDouble("LightAmplitude");
				s._color = (NamedColor)info.GetValue("Color", s);
				s._position = (PointD3D)info.GetValue("Position", s);
				s._range = info.GetDouble("Range");
				return s;
			}
Beispiel #21
0
			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 = (PenX3D)info.GetValue("MajorPen", s);

					s._showMinor = info.GetBoolean("ShowMinor");
					if (s._showMinor)
					{
						s._minorPen = (PenX3D)info.GetValue("MinorPen", s);
					}
				}

				return s;
			}
Beispiel #22
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				DashPatternGroupStyle s = null != o ? (DashPatternGroupStyle)o : new DashPatternGroupStyle();
				s._isStepEnabled = info.GetBoolean("StepEnabled");

				s._listOfValues = DashPatternListManager.Instance.BuiltinDefault;
				s.SetValueCoercedToGroup(DashPatternListManager.Instance.BuiltinDefault[0]);

				return s;
			}
Beispiel #23
0
			protected virtual CSPlaneID SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var perpendicularAxisNumber = info.GetInt32("Axis");
				var logicalValue = info.GetDouble("Logical");
				var usePhysicalValue = info.GetBoolean("UsePhysical");
				double physicalValue = 0;
				if (usePhysicalValue)
					physicalValue = (AltaxoVariant)info.GetValue("Physical", null);

				return new CSPlaneID(perpendicularAxisNumber, logicalValue, usePhysicalValue, physicalValue);
			}
Beispiel #24
0
			public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				ParameterSetElement s = o != null ? (ParameterSetElement)o : new ParameterSetElement();

				s.Name = info.GetString("Name");
				s.Parameter = info.GetDouble("Value");
				s.Variance = info.GetDouble("Variance");
				s.Vary = info.GetBoolean("Vary");

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

				s._log10Org = (double)info.GetDouble("Log10Org");
				s._log10End = (double)info.GetDouble("Log10End");

				s._decadesPerMajorTick = (int)info.GetInt32("DecadesPerMajor");

				bool AxisOrgFixed = (bool)info.GetBoolean("OrgFixed");
				bool AxisEndFixed = (bool)info.GetBoolean("EndFixed");

				s._dataBounds = (PositiveFiniteNumericalBoundaries)info.GetValue("Bounds", s);
				s._dataBounds.ParentObject = s;

				s._rescaling = new LogarithmicScaleRescaleConditions() { ParentObject = s };
				s._rescaling.SetUserParameters(AxisOrgFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.Org, AxisEndFixed ? BoundaryRescaling.Fixed : BoundaryRescaling.Auto, s.End);

				return s;
			}
Beispiel #26
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				DensityImageLegend s = null != o ? (DensityImageLegend)o : new DensityImageLegend();
				info.GetBaseValueEmbedded(s, typeof(DensityImageLegend).BaseType, parent);

				s._plotItemProxy = (Main.RelDocNodeProxy)info.GetValue("PlotItem", s);
				bool isOrientationVertical = info.GetBoolean("IsOrientationVertical");
				bool isScaleReversed = info.GetBoolean("IsScaleReversed");

				var cachedScale = (NumericalScale)info.GetValue("Scale", s); // TODO replace next 3 lines with serialization / deserialization of ScaleWithTicks
				var scaleTickSpacing = (TickSpacing)info.GetValue("TickSpacing", s);
				scaleTickSpacing.FinalProcessScaleBoundaries(cachedScale.OrgAsVariant, cachedScale.EndAsVariant, cachedScale);

				s._axisStyles = (AxisStyleCollection)info.GetValue("AxisStyles", s);
				s._axisStyles.ParentObject = s;

				s._cachedArea = new DensityLegendArea(s.Size, isOrientationVertical, isScaleReversed, cachedScale, scaleTickSpacing) { ParentObject = s };
				s._axisStyles.UpdateCoordinateSystem(s._cachedArea.CoordinateSystem);

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

        s._perpendicularAxisNumber = info.GetInt32("Axis");
        s._logicalValue = info.GetDouble("Logical");
        s._usePhysicalValue = info.GetBoolean("UsePhysical");
        if (s._usePhysicalValue)
          s._physicalValue = (AltaxoVariant)info.GetValue("Physical", s);

        return s;
      }
Beispiel #28
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (SpotLight)o ?? new SpotLight(info);
				s._isAffixedToCamera = info.GetBoolean("IsAffixedToCamera");
				s._lightAmplitude = info.GetDouble("LightAmplitude");
				s._color = (NamedColor)info.GetValue("Color", s);
				s._position = (PointD3D)info.GetValue("Position", s);
				s._directionToLight = (VectorD3D)info.GetValue("DirectionToLight", s);
				s._range = info.GetDouble("Range");
				s._outerConeAngle = info.GetDouble("OuterConeAngle");
				s._innerConeAngle = info.GetDouble("InnerConeAngle");
				return s;
			}
Beispiel #29
0
			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)
			{
				ScatterSymbolGroupStyle s = null != o ? (ScatterSymbolGroupStyle)o : new ScatterSymbolGroupStyle();
				s._isStepEnabled = info.GetBoolean("StepEnabled");

				var value = (IScatterSymbol)info.GetValue("Value", s);

				var listOfValues = (ScatterSymbolList)info.GetValue("ListOfValues", s);
				ScatterSymbolList registeredList;
				ScatterSymbolListManager.Instance.TryRegisterList(listOfValues, Main.ItemDefinitionLevel.Project, out registeredList);
				s._listOfValues = registeredList;

				s.SetValueCoercedToGroup(value);

				return s;
			}