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;
      }
      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;
      }
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = null != o ? (ItemLocationDirectAspectPreserving)o : new ItemLocationDirectAspectPreserving();
				s._originalItemSize = (VectorD3D)info.GetValue("OriginalSize", s);
				s._aspectPreserving = (AspectRatioPreservingMode)info.GetEnum("AspectPreserving", s._aspectPreserving.GetType());
				info.GetBaseValueEmbedded(s, typeof(ItemLocationDirectAspectPreserving).BaseType, parent);
				return s;
			}
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (MultiLineLabelFormattingBase)o;
				info.GetBaseValueEmbedded(s, typeof(MultiLineLabelFormattingBase).BaseType, parent);
				s._relativeLineSpacing = info.GetDouble("LineSpacing");
				s._textBlockAlignment = (Alignment)info.GetEnum("BlockAlignment", typeof(Alignment));

				return s;
			}
Beispiel #5
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (ClosedSymbolBase)o;
				s._plotColorInfluence = (PlotColorInfluence)info.GetEnum("PlotColorInfluence", typeof(PlotColorInfluence));
				s._relativeStructureWidth = info.GetDouble("StructureScale");
				s._fillColor = (NamedColor)info.GetValue("Fill", null);
				s._frame = (IScatterSymbolFrame)info.GetValue("Frame", null);
				s._inset = (IScatterSymbolInset)info.GetValue("Inset", null);

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

				s._imageFormat = (ImageFormat)info.GetValue("ImageFormat", s);
				s._pixelFormat = (PixelFormat)info.GetEnum("PixelFormat", typeof(PixelFormat));
				s.BackgroundBrush = (BrushX)info.GetValue("Background", s);
				s._sourceDpiResolution = info.GetDouble("SourceResolution");
				s._destinationDpiResolution = info.GetDouble("DestinationResolution");

				return s;
			}
			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 ? (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;
			}
Beispiel #9
0
			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)
      {
        
        DensityImagePlotStyle s = null!=o ? (DensityImagePlotStyle)o : new DensityImagePlotStyle();
        
        s.m_ScalingStyle = (DensityImagePlotStyle.ScalingStyle)info.GetEnum("ScalingStyle",s.m_ScalingStyle.GetType());
        s.m_RangeFrom    = info.GetDouble("RangeFrom");
        s.m_RangeTo      = info.GetDouble("RangeTo");
        s.m_ClipToLayer  = info.GetBoolean("ClipToLayer");
        s.m_ColorBelow   = (System.Drawing.Color)info.GetValue("ColorBelow",parent);
        s.m_ColorAbove   = (System.Drawing.Color)info.GetValue("ColorAbove",parent);
        s.m_ColorInvalid = (System.Drawing.Color)info.GetValue("ColorInvalid",parent);

        return s;
      }
Beispiel #11
0
        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._edges = new EdgeType[count];
          for (int i = 0; i < count; ++i)
            info.GetEnum("e", typeof(EdgeType));
          info.CloseArray(count);

          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;
        }
Beispiel #12
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				PenX s = null != o ? (PenX)o : new PenX();

				s._configuredProperties = (Configured)info.GetInt32("Configured");
				Configured cp = s._configuredProperties;

				if (0 != (cp & PenX.Configured.PenType))
					s._penType = (PenType)info.GetEnum("Type", typeof(PenType));
				else
					s._penType = PenType.SolidColor;

				if (0 != (cp & PenX.Configured.Alignment))
					s._alignment = (PenAlignment)info.GetEnum("Alignment", typeof(PenAlignment));
				else
					s._alignment = PenAlignment.Center;

				if (0 != (cp & PenX.Configured.Brush))
					s._brush = (BrushX)info.GetValue("Brush", s);
				else
					s._brush = new BrushX(NamedColors.Black);

				s._brush.ParentObject = s;

				if (0 != (cp & PenX.Configured.Color))
					s._color = (NamedColor)info.GetValue("Color", s);
				else
					s._color = NamedColors.Black;

				if (0 != (cp & PenX.Configured.CompoundArray))
					info.GetArray(out s._compoundArray);
				else
					s._compoundArray = new float[0];

				if (info.CurrentElementName == "DashPattern")
				{
					s._dashPattern = (IDashPattern)info.GetValue("DashPattern", null);
					if (!Drawing.DashPatterns.Solid.Instance.Equals(s._dashPattern))
					{
						if (0 != (cp & PenX.Configured.DashCap))
							s._dashCap = (DashCap)info.GetEnum("DashCap", typeof(DashCap));
						else
							s._dashCap = DashCap.Flat;
					}
				}

				s.SetCachedDashProperties();

				if (0 != (cp & PenX.Configured.EndCap))
				{
					string name = info.GetString("EndCap");
					var absSize = info.GetDouble("EndCapAbsSize");
					var relSize = info.GetDouble("EndCapRelSize");
					s._endCap = LineCapExtension.FromNameAndAbsAndRelSize(name, absSize, relSize);
				}
				else
					s._endCap = LineCapExtension.Flat;

				if (0 != (cp & PenX.Configured.LineJoin))
					s._lineJoin = (LineJoin)info.GetEnum("LineJoin", typeof(LineJoin));
				else
					s._lineJoin = LineJoin.Miter;

				if (0 != (cp & PenX.Configured.MiterLimit))
					s._miterLimit = info.GetSingle("MiterLimit");
				else
					s._miterLimit = 10;

				if (0 != (cp & PenX.Configured.StartCap))
				{
					string name = info.GetString("StartCap");
					var absSize = info.GetDouble("StartCapAbsSize");
					var relSize = info.GetDouble("StartCapRelSize");
					s._startCap = LineCapExtension.FromNameAndAbsAndRelSize(name, absSize, relSize);
				}
				else
					s._startCap = LineCapExtension.Flat;

				if (0 != (cp & PenX.Configured.Transform))
				{
					float[] el;
					info.GetArray(out el);
					s._transformation = new Matrix(el[0], el[1], el[2], el[3], el[4], el[5]);
				}
				else
					s._transformation = new Matrix();

				if (0 != (cp & PenX.Configured.Width))
					s._width = info.GetDouble("Width");
				else
					s._width = 1;

				s.ParentObject = (Main.IDocumentNode)parent;
				return s;
			}
			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;
			}
			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;
			}
Beispiel #15
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;
			}
Beispiel #16
0
      protected virtual AltaxoVariant SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {
        AltaxoVariant s = (o == null ? new AltaxoVariant() : (AltaxoVariant)o);
        Content c = (Content)info.GetEnum("Content", typeof(Content));
        s.m_Content = c;

        switch(c)
        {
          case Content.VNull:
            break;
          case Content.VDouble:
            s.m_Double = info.GetDouble("Value");
            break;
          case Content.VDateTime:
            s.m_Object = info.GetDateTime("Value");
            break;
          case Content.VString:
            s.m_Object = info.GetString("Value");
            break;
          default:
            s.m_Object = info.GetValue("Value",s);
            break;
        }

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

				s._oneLever = info.GetDouble("OneLever");
				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._userDefinedNumberOfDecadesPerMajorTick = info.GetNullableInt32("UserDefinedMajorDecades");
				s._userDefinedMinorTicks = info.GetNullableInt32("UserDefinedMinorTicks");

				s._transformationExponent = info.GetDouble("TransformationExponent");
				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;
			}
			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("MinimumWaitingTimeAfterUpdate");
				s._maximumWaitingTimeAfterUpdate = info.GetDouble("MaximumWaitingTimeAfterUpdate");
				s._minimumWaitingTimeAfterFirstTrigger = info.GetDouble("MinimumWaitingTimeAfterFirstTrigger");
				s._maximumWaitingTimeAfterFirstTrigger = info.GetDouble("MaximumWaitingTimeAfterFirstTrigger");
				s._minimumWaitingTimeAfterLastTrigger = info.GetDouble("MinimumWaitingTimeAfterLastTrigger");

				return s;
			}
Beispiel #19
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 };
				}
			}
Beispiel #20
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				ColumnStyle 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 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));
			}
Beispiel #22
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				PenX s = null != o ? (PenX)o : new PenX();

				s._configuredProperties = (Configured)info.GetInt32("Configured");
				Configured cp = s._configuredProperties;

				if (0 != (cp & PenX.Configured.PenType))
					s._penType = (PenType)info.GetEnum("Type", typeof(PenType));
				else
					s._penType = PenType.SolidColor;

				if (0 != (cp & PenX.Configured.Alignment))
					s._alignment = (PenAlignment)info.GetEnum("Alignment", typeof(PenAlignment));
				else
					s._alignment = PenAlignment.Center;

				if (0 != (cp & PenX.Configured.Brush))
					s._brush = (BrushX)info.GetValue("Brush", s);
				else
					s._brush = new BrushX(NamedColors.Black) { ParentObject = s };

				if (0 != (cp & PenX.Configured.Color))
					s._color = (NamedColor)info.GetValue("Color", s);
				else
					s._color = NamedColors.Black;

				if (0 != (cp & PenX.Configured.CompoundArray))
					info.GetArray(out s._compoundArray);
				else
					s._compoundArray = new float[0];

				if (0 != (cp & PenX.Configured.DashStyle))
					s._cachedDashStyle = (DashStyle)info.GetEnum("DashStyle", typeof(DashStyle));
				else
					s._cachedDashStyle = DashStyle.Solid;

				if (0 != (cp & PenX.Configured.DashCap))
					s._dashCap = (DashCap)info.GetEnum("DashCap", typeof(DashCap));
				else
					s._dashCap = DashCap.Flat;

				if (0 != (cp & PenX.Configured.DashOffset))
					s._cachedDashOffset = (float)info.GetSingle("DashOffset");
				else
					s._cachedDashOffset = 0;

				if (0 != (cp & PenX.Configured.DashPattern))
					info.GetArray(out s._cachedDashPattern);
				else
					s._cachedDashPattern = null;

				s.SetDashPatternFromCachedDashPropertiesAfterOldDeserialization();

				if (0 != (cp & PenX.Configured.EndCap))
				{
					LineCap cap = (LineCap)info.GetEnum("EndCap", typeof(LineCap));
					s._endCap = LineCapExtension.FromName(Enum.GetName(typeof(LineCap), cap));
				}
				else
					s._endCap = LineCapExtension.Flat;

				if (0 != (cp & PenX.Configured.LineJoin))
					s._lineJoin = (LineJoin)info.GetEnum("LineJoin", typeof(LineJoin));
				else
					s._lineJoin = LineJoin.Miter;

				if (0 != (cp & PenX.Configured.MiterLimit))
					s._miterLimit = info.GetSingle("MiterLimit");
				else
					s._miterLimit = 10;

				if (0 != (cp & PenX.Configured.StartCap))
				{
					LineCap cap = (LineCap)info.GetEnum("StartCap", typeof(LineCap));
					s._startCap = LineCapExtension.FromName(Enum.GetName(typeof(LineCap), cap));
				}
				else
					s._startCap = LineCapExtension.Flat;

				if (0 != (cp & PenX.Configured.Transform))
				{
					float[] el;
					info.GetArray(out el);
					s._transformation = new Matrix(el[0], el[1], el[2], el[3], el[4], el[5]);
				}
				else
					s._transformation = new Matrix();

				if (0 != (cp & PenX.Configured.Width))
					s._width = info.GetDouble("Width");
				else
					s._width = 1;

				if (s.ParentObject == null)
					s.ParentObject = (Main.IDocumentNode)parent;

				return s;
			}
			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;
			}
Beispiel #24
0
			public static object SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent, bool nativeCall)
			{
				LabelPlotStyle s = null != o ? (LabelPlotStyle)o : new LabelPlotStyle(info);

				s._font = (FontX)info.GetValue("Font", s);
				s._independentColor = info.GetBoolean("IndependentColor");
				s._brush = (BrushX)info.GetValue("Brush", s);
				s._offsetX_EmUnits = info.GetDouble("XOffset");
				s._offsetY_EmUnits = info.GetDouble("YOffset");
				s._rotation = info.GetDouble("Rotation");
				s.AlignmentX = GdiExtensionMethods.ToAltaxo((System.Drawing.StringAlignment)info.GetEnum("HorizontalAlignment", typeof(System.Drawing.StringAlignment)));
				s.AlignmentY = GdiExtensionMethods.ToAltaxo((System.Drawing.StringAlignment)info.GetEnum("VerticalAlignment", typeof(System.Drawing.StringAlignment)));
				bool attachToAxis = info.GetBoolean("AttachToAxis");
				EdgeType attachedAxis = (EdgeType)info.GetValue("AttachedAxis", s);
				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) { ParentObject = s };

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

				return s;
			}
Beispiel #25
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;
			}
Beispiel #26
0
			public static object SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent, bool nativeCall)
			{
				LabelPlotStyle s = null != o ? (LabelPlotStyle)o : new LabelPlotStyle(info);

				s._font = (FontX)info.GetValue("Font", s);
				s._independentColor = info.GetBoolean("IndependentColor");
				s._brush = (BrushX)info.GetValue("Brush", s);
				s._offsetX_EmUnits = info.GetDouble("XOffset");
				s._offsetY_EmUnits = info.GetDouble("YOffset");
				s._rotation = info.GetDouble("Rotation");
				s.AlignmentX = GdiExtensionMethods.ToAltaxo((System.Drawing.StringAlignment)info.GetEnum("HorizontalAlignment", typeof(System.Drawing.StringAlignment)));
				s.AlignmentY = GdiExtensionMethods.ToAltaxo((System.Drawing.StringAlignment)info.GetEnum("VerticalAlignment", typeof(System.Drawing.StringAlignment)));
				s.AttachedAxis = (CSPlaneID)info.GetValue("AttachedAxis", s);
				s._backgroundColorLinkage = (ColorLinkage)info.GetEnum("BackgroundColorLinkage", typeof(ColorLinkage));

				s._backgroundStyle = (IBackgroundStyle)info.GetValue("Background", s);
				if (null != s._backgroundStyle) s._backgroundStyle.ParentObject = s;

				s.LabelColumnProxy = (Altaxo.Data.IReadableColumnProxy)info.GetValue("LabelColumn", s);

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

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

        // Styles
        bool showAxis = info.GetBoolean("ShowAxis");
        EdgeType edge = (EdgeType)info.GetEnum("Edge", typeof(EdgeType));
        s.AxisLineStyle = (AxisLineStyle)info.GetValue("AxisStyle", s);
        bool showMajorLabels = info.GetBoolean("ShowMajorLabels");
        if (showMajorLabels)
          s.MajorLabelStyle = (AxisLabelStyleBase)info.GetValue("MajorLabelStyle", s);
        else s.MajorLabelStyle = null;

        bool showMinorLabels = info.GetBoolean("ShowMinorLabels");
        if (showMinorLabels)
          s.MinorLabelStyle = (AxisLabelStyleBase)info.GetValue("MinorLabelStyle", s);
        else
          s.MinorLabelStyle = null;

        s.Title = (TextGraphic)info.GetValue("AxisTitle", s);

        if (!showAxis)
        {
          s.MajorLabelStyle = null;
          s.MinorLabelStyle = null;
          s.AxisLineStyle = null;
          s.Title = null;
        }


                  double offset = 0;
                  if (s.AxisLineStyle != null && s.AxisLineStyle.Position.IsRelative)
                  {
                    offset = s.AxisLineStyle.Position.Value;
                    // Note here: Absolute values are no longer supported
                    // and so this problem can not be fixed here.
                  }

        switch (edge)
        {
          case EdgeType.Bottom:
            s._styleID = new CSLineID(0, -offset);
            break;
          case EdgeType.Top:
            s._styleID = new CSLineID(0, 1+offset);
            break;
          case EdgeType.Left:
            s._styleID = new CSLineID(1, -offset);
            break;
          case EdgeType.Right:
            s._styleID = new CSLineID(1, 1+offset);
            break;
        }


        return s;
      }
Beispiel #28
0
			public static object SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent, bool nativeCall)
			{
				var s = (LabelPlotStyle)o ?? new LabelPlotStyle(info);

				s.LabelColumnProxy = (Altaxo.Data.IReadableColumnProxy)info.GetValue("LabelColumn", s);
				s._attachedPlane = (CSPlaneID)info.GetValue("AttachedPlane", s);
				s._independentSkipFrequency = info.GetBoolean("IndependentSkipFreq");
				s._skipFrequency = info.GetInt32("SkipFreq");
				s._ignoreMissingDataPoints = info.GetBoolean("IgnoreMissingDataPoints");
				s._independentOnShiftingGroupStyles = info.GetBoolean("IndependentOnShiftingGroupStyles");
				s._labelFormatString = info.GetString("LabelFormat");

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

				s._fontSizeOffset = info.GetDouble("FontSizeOffset");
				s._fontSizeFactor = info.GetDouble("FontSizeFactor");

				s._font = (FontX)info.GetValue("Font", s);
				s._brush = (BrushX)info.GetValue("Material", s);
				s._independentColor = info.GetBoolean("IndependentColor");

				s._alignmentX = (Alignment)info.GetEnum("AlignmentX", typeof(Alignment));
				s._alignmentY = (Alignment)info.GetEnum("AlignmentY", typeof(Alignment));

				s._rotation = info.GetDouble("Rotation");

				s._offsetX_Points = info.GetDouble("OffsetXPoints");
				s._offsetX_EmUnits = info.GetDouble("OffsetXEm");
				s._offsetX_SymbolSizeUnits = info.GetDouble("OffsetXSymbolSize");

				s._offsetY_Points = info.GetDouble("OffsetYPoints");
				s._offsetY_EmUnits = info.GetDouble("OffsetYEm");
				s._offsetY_SymbolSizeUnits = info.GetDouble("OffsetYSymbolSize");

				s._backgroundColorLinkage = (ColorLinkage)info.GetEnum("BackgroundColorLinkage", typeof(ColorLinkage));

				s._backgroundStyle = (IBackgroundStyle)info.GetValue("Background", s);
				if (null != s._backgroundStyle) s._backgroundStyle.ParentObject = s;

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

				return s;
			}
Beispiel #29
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;
			}
Beispiel #30
0
			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;
			}