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

				XmlSerializationSurrogate0 surr = new XmlSerializationSurrogate0();
				surr._TableController = s;
				if (info.CurrentElementName == "Controller")
				{
					info.OpenElement();
					surr._PathToLayout = (AbsoluteDocumentPath)info.GetValue("Layout", s);
					info.CloseElement();
				}
				else if (info.CurrentElementName == "BaseType")
				{
					info.GetString("BaseType");
					surr._PathToLayout = (AbsoluteDocumentPath)info.GetValue("Layout", s);
				}
				else
				{
					surr._PathToLayout = (AbsoluteDocumentPath)info.GetValue("Layout", s);
				}

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

				return s;
			}
Beispiel #2
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				XYColumnPlotData pa = (XYColumnPlotData)info.GetValue("Data", null);
				XYLineScatterPlotStyle lsps = (XYLineScatterPlotStyle)info.GetValue("Style", null);
				if (lsps.XYPlotLineStyle != null)
					lsps.XYPlotLineStyle.UseSymbolGap = lsps.LineSymbolGap; // this has changed and is now hosted in the LineStyle itself

				G2DPlotStyleCollection ps = new G2DPlotStyleCollection(new IG2DPlotStyle[] { lsps.XYPlotLineStyle, lsps.ScatterStyle, lsps.XYPlotLabelStyle });
				if (lsps.XYPlotLabelStyle != null)
				{
					XmlSerializationSurrogate0 surr = new XmlSerializationSurrogate0();
					surr._item = pa;
					surr._label = lsps.XYPlotLabelStyle;
					info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(surr.info_DeserializationFinished);
				}

				if (null == o)
				{
					return new XYColumnPlotItem(pa, ps);
				}
				else
				{
					XYColumnPlotItem s = (XYColumnPlotItem)o;
					s.Data = pa;
					s.Style = ps;
					return s;
				}
			}
Beispiel #3
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				TablePlusLayout s = null != o ? (TablePlusLayout)o : new TablePlusLayout();

				s._table = (Altaxo.Data.DataTable)info.GetValue("Table", s);
				s._layout = (Altaxo.Worksheet.WorksheetLayout)info.GetValue("Layout", s);
				return s;
			}
Beispiel #4
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;
			}
Beispiel #5
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				OpenPathShapeBase s = (OpenPathShapeBase)o;
				info.GetBaseValueEmbedded(s, typeof(OpenPathShapeBase).BaseType, parent);

				s.Pen = (PenX)info.GetValue("LinePen", s);
				s.OutlinePen = (PenX)info.GetValue("OutlinePen", s);
				return s;
			}
Beispiel #6
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;
			}
			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;
			}
      public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {
        NonlinearFitDocument s = o!=null ? (NonlinearFitDocument)o : new NonlinearFitDocument();

        s._fitEnsemble = (FitEnsemble)info.GetValue("FitEnsemble",s);
        s._fitEnsemble.Changed += new EventHandler(s.EhFitEnsemble_Changed);
        s._currentParameters = (ParameterSet)info.GetValue("Parameters",s);

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

				s._text = info.GetString("Text");
				s._font = (FontX)info.GetValue("Font", s);
				s._color = (Color)info.GetValue("Color", s);
				return s;
			}
			public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (TransformedReadableColumnProxyForStandaloneColumns)o ?? new TransformedReadableColumnProxyForStandaloneColumns(info);
				s._underlyingColumn = (IReadableColumn)info.GetValue("Column", s);
				s._transformation = (IVariantToVariantTransformation)info.GetValue("Transformation", s);
				if (null != s._underlyingColumn)
					s._cachedResultingColumn = new TransformedReadableColumn(s._underlyingColumn, s._transformation);

				return s;
			}
Beispiel #11
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (RectangularBackground)o ?? new RectangularBackground();
				s._material = (IMaterial)info.GetValue("Material", s);
				s._padding = (Margin2D)info.GetValue("Padding", s);
				s._customDistance = info.GetNullableDouble("CustomDistance");
				s._customThickness = info.GetNullableDouble("CustomThickness");

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

				s.InternalSetDataBounds((TextBoundaries)info.GetValue("Bounds", s));
				s.InternalSetRescaling((NumericScaleRescaleConditions)info.GetValue("Rescaling", s));
				s.ProcessDataBounds();

				return s;
			}
Beispiel #13
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (LightSettings)o ?? new LightSettings(info);
				s._ambientLight = (HemisphericAmbientLight)info.GetValue("AmbientLight", s);
				s._discreteLight0 = (IDiscreteLight)info.GetValue("DiscreteLight0", s);
				s._discreteLight1 = (IDiscreteLight)info.GetValue("DiscreteLight1", s);
				s._discreteLight2 = (IDiscreteLight)info.GetValue("DiscreteLight2", s);
				s._discreteLight3 = (IDiscreteLight)info.GetValue("DiscreteLight3", s);
				s.CalculateIsAnyAffixedToCamera();
				return s;
			}
Beispiel #14
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 #15
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (OrthographicCamera)o ?? new OrthographicCamera();
				s._upVector = (VectorD3D)info.GetValue("UpVector", s);
				s._eyePosition = (PointD3D)info.GetValue("EyePosition", s);
				s._targetPosition = (PointD3D)info.GetValue("TargetPosition", s);
				s._zNear = info.GetDouble("ZNear");
				s._zFar = info.GetDouble("ZFar");
				s._widthAtZNear = info.GetDouble("Width");
				return s;
			}
Beispiel #16
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;
			}
Beispiel #17
0
			protected virtual GridPartitioning SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (o == null ? new GridPartitioning() : (GridPartitioning)o);

				s._xPartitioning = (LinearPartitioning)info.GetValue("XPartitioning", s);
				if (null != s._xPartitioning) s._xPartitioning.ParentObject = s;

				s._yPartitioning = (LinearPartitioning)info.GetValue("YPartitioning", s);
				if (null != s._yPartitioning) s._yPartitioning.ParentObject = s;

				return s;
			}
Beispiel #18
0
			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);
			}
			protected virtual DecomposeByColumnContentDataSource SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (o == null ? new DecomposeByColumnContentDataSource() : (DecomposeByColumnContentDataSource)o);

				s._processData = (DataTableMultipleColumnProxy)info.GetValue("ProcessData", s);
				s._processOptions = (DecomposeByColumnContentOptions)info.GetValue("ProcessOptions", s);
				s._importOptions = (IDataSourceImportOptions)info.GetValue("ImportOptions", s);

				s.InputData = s._processData;

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

				s._axisOrg = info.GetDateTime("Org");
				s._axisEnd = info.GetDateTime("End");
				s.ChildSetMember(ref s._rescaling, (DateTimeScaleRescaleConditions)info.GetValue("Rescaling", s));
				s.ChildSetMember(ref s._dataBounds, (FiniteDateTimeBoundaries)info.GetValue("Bounds", s));
				s.ChildSetMember(ref s._tickSpacing, new Ticks.DateTimeTickSpacing());

				s.EhChildChanged(s._dataBounds, EventArgs.Empty); // for this old version, rescaling is not fully serialized, thus we have to simulate a DataBoundChanged event to get _rescaling updated, and finally _tickSpacing updated

				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;
			}
			protected virtual FourierTransformation2DDataSource SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (o == null ? new FourierTransformation2DDataSource() : (FourierTransformation2DDataSource)o);

				s._inputData = (DataTableMatrixProxy)info.GetValue("InputData", s);
				if (null != s._inputData) s._inputData.ParentObject = s;

				s._transformationOptions = (RealFourierTransformation2DOptions)info.GetValue("TransformationOptions", s);
				s._importOptions = (IDataSourceImportOptions)info.GetValue("ImportOptions", s);

				s.InputData = s._inputData;

				return s;
			}
Beispiel #24
0
			protected virtual AsciiImportDataSource SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (o == null ? new AsciiImportDataSource() : (AsciiImportDataSource)o);
				s._isDeserializationInProgress = true;
				s.ChildSetMember(ref s._importOptions, (IDataSourceImportOptions)info.GetValue("ImportOptions", s));
				s.ChildSetMember(ref s._asciiImportOptions, (AsciiImportOptions)info.GetValue("AsciiImportOptions", s));
				var count = info.OpenArray("AsciiFiles");
				for (int i = 0; i < count; ++i)
					s._asciiFiles.Add((AbsoluteAndRelativeFileName)info.GetValue("e", s));
				info.CloseArray(count);

				info.AfterDeserializationHasCompletelyFinished += s.EhAfterDeserializationHasCompletelyFinished;

				return s;
			}
			public virtual object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (ReadableColumnProxyForStandaloneColumns)o ?? new ReadableColumnProxyForStandaloneColumns(null);
				object node = info.GetValue("Column", s);
				s._column = (IReadableColumn)node;
				return s;
			}
Beispiel #26
0
			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (EmbeddedImageGraphic)o ?? new EmbeddedImageGraphic(info);
				info.GetBaseValueEmbedded(s, typeof(EmbeddedImageGraphic).BaseType, parent);
				s.Image = (ImageProxy)info.GetValue("Image", s);
				return s;
			}
      public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {
        

        int independentVariable = info.GetInt32("IndependentVariable");
        int dependentVariable = info.GetInt32("DependentVariable");
        double[] parameter;
        info.GetArray("ParameterValues",out parameter);

        object fo = info.GetValue("FitFunction");

        if( fo is Altaxo.Serialization.Xml.AssemblyAndTypeSurrogate)
          fo = ((Altaxo.Serialization.Xml.AssemblyAndTypeSurrogate)fo).CreateInstance();

        FitFunctionToScalarFunctionDDWrapper s;
        if(o == null)
        {
          s = new FitFunctionToScalarFunctionDDWrapper(fo as IFitFunction,dependentVariable,independentVariable,parameter);
        }
        else
        {
          s = (FitFunctionToScalarFunctionDDWrapper)o;
          s = (FitFunctionToScalarFunctionDDWrapper)o; 
          s._independentVariable = independentVariable;
          s._dependentVariable = dependentVariable;
          s._parameter = parameter;
          s._fitFunction = fo as IFitFunction;
        }

        return s;
      }
 public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
 {
   GraphController wc = (GraphController)info.GetValue("Controller", parent);
   SDGraphViewContent s = null != o ? (SDGraphViewContent)o : new SDGraphViewContent(wc);
   s._controller = wc;
   return s;
 }
      public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {
        FilledRectangle s = null!=o ? (FilledRectangle)o : new FilledRectangle();
        s._brush = (BrushX)info.GetValue("Brush",parent);

        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");

				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;
			}