当前位置: 首页>>代码示例>>C#>>正文


C# Altaxo.GetSingle方法代码示例

本文整理汇总了C#中Altaxo.GetSingle方法的典型用法代码示例。如果您正苦于以下问题:C# Altaxo.GetSingle方法的具体用法?C# Altaxo.GetSingle怎么用?C# Altaxo.GetSingle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Altaxo的用法示例。


在下文中一共展示了Altaxo.GetSingle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Deserialize

 public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
 {
   
   float w = info.GetSingle("Width");
   float h = info.GetSingle("Height");
   return new SizeF(w,h);
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:SystemDrawingSerialization.cs

示例2: SDeserialize

      protected virtual ScatterPlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {
        ScatterPlotStyle s = null != o ? (ScatterPlotStyle)o : new ScatterPlotStyle();

        s._shape = (XYPlotScatterStyles.Shape)info.GetValue("Shape", typeof(XYPlotScatterStyles.Shape));
        s._style = (XYPlotScatterStyles.Style)info.GetValue("Style", typeof(XYPlotScatterStyles.Style));
        XYPlotScatterStyles.DropLine dropLine = (XYPlotScatterStyles.DropLine)info.GetValue("DropLine", typeof(XYPlotScatterStyles.DropLine));
        s._pen = (PenX)info.GetValue("Pen", typeof(PenX));
        s._symbolSize = info.GetSingle("SymbolSize");
        s._relativePenWidth = info.GetSingle("RelativePenWidth");

        if (0 != (dropLine & XYPlotScatterStyles.DropLine.Bottom))
          s._dropLine.Add(CSPlaneID.Bottom);
        if (0 != (dropLine & XYPlotScatterStyles.DropLine.Top))
          s._dropLine.Add(CSPlaneID.Top);
        if (0 != (dropLine & XYPlotScatterStyles.DropLine.Left))
          s._dropLine.Add(CSPlaneID.Left);
        if (0 != (dropLine & XYPlotScatterStyles.DropLine.Right))
          s._dropLine.Add(CSPlaneID.Right);



        return s;
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:24,代码来源:ScatterPlotStyle.cs

示例3: Deserialize

      public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {

        BrushX s = null != o ? (BrushX)o : new BrushX(Color.Black);

        s._brushType = (BrushType)info.GetValue("Type", s);
        switch (s._brushType)
        {
          case BrushType.SolidBrush:
            s._foreColor = (Color)info.GetValue("ForeColor", s);
            break;
          case BrushType.HatchBrush:
            s._foreColor = (Color)info.GetValue("ForeColor", s);
            s._backColor = (Color)info.GetValue("BackColor", s);
            s._exchangeColors = info.GetBoolean("ExchangeColors");
            s._hatchStyle = (HatchStyle)info.GetEnum("HatchStyle", typeof(HatchStyle));
            break;
          case BrushType.LinearGradientBrush:
            s._foreColor = (Color)info.GetValue("ForeColor", s);
            s._backColor = (Color)info.GetValue("BackColor", s);
            s._exchangeColors = info.GetBoolean("ExchangeColors");
            s._wrapMode = (WrapMode)info.GetEnum("WrapMode", typeof(WrapMode));
            s._gradientMode = (LinearGradientMode)info.GetEnum("GradientMode", typeof(LinearGradientMode));
            s._gradientShape = (LinearGradientShape)info.GetEnum("GradientShape", typeof(LinearGradientShape));
            s._scale = info.GetSingle("Scale");
            s._focus = info.GetSingle("Focus");
            break;
          case BrushType.PathGradientBrush:
            s._foreColor = (Color)info.GetValue("ForeColor", s);
            s._backColor = (Color)info.GetValue("BackColor", s);
            s._exchangeColors = info.GetBoolean("ExchangeColors");
            s._wrapMode = (WrapMode)info.GetEnum("WrapMode", typeof(WrapMode));
            break;
          case BrushType.TextureBrush:
            s.TextureImage = (ImageProxy)info.GetValue("Texture", s);
            s._wrapMode = (WrapMode)info.GetEnum("WrapMode", typeof(WrapMode));
            s._scale = info.GetSingle("Scale");
            break;
        }
        return s;
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:41,代码来源:BrushX.cs

示例4: Deserialize

			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				TextGraphic s = null != o ? (TextGraphic)o : new TextGraphic(info);
				info.GetBaseValueEmbedded(s, "AltaxoBase,Altaxo.Graph.GraphicsObject,0", parent);

				// we have changed the meaning of rotation in the meantime, This is not handled in GetBaseValueEmbedded,
				// since the former versions did not store the version number of embedded bases
				//s._rotation = -s._rotation;

				s._text = info.GetString("Text");
				s._font = (FontX)info.GetValue("Font", s);
				s._textBrush = (BrushX)info.GetValue("Brush", s);
				if (null != s._textBrush) s._textBrush.ParentObject = s;
				s.BackgroundStyleOld = (BackgroundStyle)info.GetValue("BackgroundStyle", s);
				s._lineSpacingFactor = info.GetSingle("LineSpacing");
				info.GetSingle("ShadowLength");
				var xAnchorType = (XAnchorPositionType)info.GetValue("XAnchor", s);
				var yAnchorType = (YAnchorPositionType)info.GetValue("YAnchor", s);
				s._location.LocalAnchorX = RADouble.NewRel(0.5 * (int)xAnchorType);
				s._location.LocalAnchorY = RADouble.NewRel(0.5 * (int)yAnchorType);

				return s;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:23,代码来源:TextGraphic.cs

示例5: Deserialize

			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;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:49,代码来源:ColumnStyle.cs

示例6: Deserialize

      public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {

        AxisLineStyle s = null != o ? (AxisLineStyle)o : new AxisLineStyle();

        s._axisPen = (PenX)info.GetValue("AxisPen", s);
        s._majorTickPen = (PenX)info.GetValue("MajorPen", s);
        s._minorTickPen = (PenX)info.GetValue("MinorPen", s);

        s._majorTickLength = (float)info.GetSingle("MajorLength");
        s._minorTickLength = (float)info.GetSingle("MinorLength");
        s._axisPosition = (Calc.RelativeOrAbsoluteValue)info.GetValue("AxisPosition", s);
        s._showFirstUpMajorTicks = (bool)info.GetBoolean("Major1Up");
        s._showFirstDownMajorTicks = (bool)info.GetBoolean("Major1Dw");
        s._showFirstUpMinorTicks = (bool)info.GetBoolean("Minor1Up");
        s._showFirstDownMinorTicks = (bool)info.GetBoolean("Minor1Dw");

        s.WireEventChain(true);

        return s;
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:21,代码来源:AxisLineStyle.cs

示例7: Deserialize

      public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {

        TextGraphic s = null != o ? (TextGraphic)o : new TextGraphic();
        info.GetBaseValueEmbedded(s, typeof(TextGraphic).BaseType, parent);

        s._text = info.GetString("Text");
        s._font = (Font)info.GetValue("Font", typeof(Font));
        s._textBrush = (BrushX)info.GetValue("Brush", typeof(BrushX));
        s._background = (IBackgroundStyle)info.GetValue("BackgroundStyle", typeof(IBackgroundStyle));
        s._lineSpacingFactor = info.GetSingle("LineSpacing");
        s._xAnchorType = (XAnchorPositionType)info.GetValue("XAnchor", typeof(XAnchorPositionType));
        s._yAnchorType = (YAnchorPositionType)info.GetValue("YAnchor", typeof(YAnchorPositionType));

        return s;
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:16,代码来源:TextGraphic.cs

示例8: Deserialize

 public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
 {
   
   GraphController s = null!=o ? (GraphController)o : new GraphController(null,true);
   s.m_AutoZoom = info.GetBoolean("AutoZoom");
   s.m_Zoom = info.GetSingle("Zoom");
   s.m_Graph = null;
   
   XmlSerializationSurrogate0 surr = new XmlSerializationSurrogate0();
   surr._GraphController = s;
   surr._PathToGraph = (Main.DocumentPath)info.GetValue("Graph",s);
   info.DeserializationFinished += new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(surr.EhDeserializationFinished);
   
   return s;
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:15,代码来源:GraphController.cs

示例9: SDeserialize

			protected virtual ScatterPlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				ScatterPlotStyle s = null != o ? (ScatterPlotStyle)o : new ScatterPlotStyle(info);

				s._independentSkipFreq = info.GetBoolean("IndependentSkipFreq");
				s._skipFreq = info.GetInt32("SkipFreq");

				s._symbolShape = (IScatterSymbol)info.GetValue("Shape", s);
				s._independentSymbolSize = info.GetBoolean("IndependentSymbolSize");
				s._symbolSize = info.GetSingle("SymbolSize");

				s._material = (IMaterial)info.GetValue("Material", s);
				s._independentColor = info.GetBoolean("IndependentColor");
				return s;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:15,代码来源:ScatterPlotStyle.cs

示例10: Deserialize

      public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {

        PenX s = null != o ? (PenX)o : new PenX();

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

        

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

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

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

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

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

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

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

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

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

        if (0 != (cp & PenX.Configured.EndCap))
        {
          string name = info.GetString("EndCap");
          float size = info.GetSingle("EndCapSize");
          s.m_EndCap = new LineCapEx(name, size);
        }
        else
          s.m_EndCap = LineCapEx.Flat;

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

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

        if (0 != (cp & PenX.Configured.StartCap))
        {
          string name = info.GetString("StartCap");
          float size = info.GetSingle("StartCapSize");
          s.m_StartCap = new LineCapEx(name, size);
        }
        else
          s.m_StartCap = LineCapEx.Flat;

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

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

        return s;
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:99,代码来源:PenX.cs

示例11: Deserialize

			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (ScatterPlotStyle)o ?? new ScatterPlotStyle(info);

				s._independentSkipFreq = info.GetBoolean("IndependentSkipFreq");
				s._skipFreq = info.GetInt32("SkipFreq");

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

				s._independentScatterSymbol = info.GetBoolean("IndependentScatterSymbol");
				s._scatterSymbol = (IScatterSymbol)info.GetValue("ScatterSymbol", s);

				s._independentSymbolSize = info.GetBoolean("IndependentSymbolSize");
				s._symbolSize = info.GetSingle("SymbolSize");
				s._independentColor = info.GetBoolean("IndependentColor");
				s._color = (NamedColor)info.GetValue("Color", s);

				s._overrideFrame = info.GetBoolean("OverrideFrame");
				s._overriddenFrame = (IScatterSymbolFrame)info.GetValue("OverriddenFrame", s);
				s._overrideInset = info.GetBoolean("OverrideInset");
				s._overriddenInset = (IScatterSymbolInset)info.GetValue("OverriddenInset", s);
				s._overrideStructureWidthOffset = info.GetNullableDouble("OverriddenStructureWidthOffset");
				s._overrideStructureWidthFactor = info.GetNullableDouble("OverriddenStructureWidthFactor");
				s._overridePlotColorInfluence = info.GetNullableEnum<PlotColorInfluence>("OverriddenPlotColorInfluence");
				s._overrideFillColor = (NamedColor?)info.GetValue("OverriddenFillColor", s);
				s._overrideFrameColor = (NamedColor?)info.GetValue("OverriddenFrameColor", s);
				s._overrideInsetColor = (NamedColor?)info.GetValue("OverriddenInsetColor", s);

				return s;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:31,代码来源:ScatterPlotStyle_Serialization.cs

示例12: Deserialize

      public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
      {

        GraphicBase s = (GraphicBase)o;

        s._position = (PointF)info.GetValue("Position", s);
        s._bounds = (RectangleF)info.GetValue("Bounds", s);
        s._rotation = info.GetSingle("Rotation");
        s._autoSize = info.GetBoolean("AutoSize");

        return s;
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:12,代码来源:GraphicBase.cs

示例13: Deserialize

			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;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:99,代码来源:PenX.cs

示例14: SDeserialize

			protected virtual XYPlotLayer SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				XYPlotLayer s = null != o ? (XYPlotLayer)o : new XYPlotLayer(info);

				bool fillLayerArea = info.GetBoolean("FillLayerArea");
				BrushX layerAreaFillBrush = (BrushX)info.GetValue("LayerAreaFillBrush", s);

				if (fillLayerArea)
				{
					if (!s.GridPlanes.Contains(CSPlaneID.Front))
						s.GridPlanes.Add(new GridPlane(CSPlaneID.Front));
					s.GridPlanes[CSPlaneID.Front].Background = layerAreaFillBrush;
				}

				// size, position, rotation and scale

				var widthType = (XYPlotLayerSizeType)info.GetValue("WidthType", s);
				var heightType = (XYPlotLayerSizeType)info.GetValue("HeightType", s);
				var width = info.GetDouble("Width");
				var height = info.GetDouble("Height");
				s._cachedLayerSize = (SizeF)info.GetValue("CachedSize", s);
				s._coordinateSystem.UpdateAreaSize(s._cachedLayerSize);

				var xPositionType = (XYPlotLayerPositionType)info.GetValue("XPositionType", s);
				var yPositionType = (XYPlotLayerPositionType)info.GetValue("YPositionType", s);
				var xPosition = info.GetDouble("XPosition");
				var yPosition = info.GetDouble("YPosition");
				s._cachedLayerPosition = (PointF)info.GetValue("CachedPosition", s);
				var rotation = info.GetSingle("Rotation");
				var scale = info.GetSingle("Scale");
				s.Location = new XYPlotLayerPositionAndSize_V0(widthType, width, heightType, height, xPositionType, xPosition, yPositionType, yPosition, rotation, scale).ConvertToCurrentLocationVersion(s._cachedLayerSize, s._cachedLayerPosition);

				// axis related

				var xAxis = (Altaxo.Graph.Scales.Deprecated.Scale)info.GetValue("XAxis", s);
				var yAxis = (Altaxo.Graph.Scales.Deprecated.Scale)info.GetValue("YAxis", s);
				bool xIsLinked = info.GetBoolean("LinkXAxis");
				bool yIsLinked = info.GetBoolean("LinkYAxis");
				double xOrgA = info.GetDouble("LinkXAxisOrgA");
				double xOrgB = info.GetDouble("LinkXAxisOrgB");
				double xEndA = info.GetDouble("LinkXAxisEndA");
				double xEndB = info.GetDouble("LinkXAxisEndB");
				double yOrgA = info.GetDouble("LinkYAxisOrgA");
				double yOrgB = info.GetDouble("LinkYAxisOrgB");
				double yEndA = info.GetDouble("LinkYAxisEndA");
				double yEndB = info.GetDouble("LinkYAxisEndB");
				s.SetupOldAxis(0, xAxis, xIsLinked, xOrgA, xOrgB, xEndA, xEndB);
				s.SetupOldAxis(1, yAxis, yIsLinked, yOrgA, yOrgB, yEndA, yEndB);

				// Styles
				bool showLeft = info.GetBoolean("ShowLeftAxis");
				bool showBottom = info.GetBoolean("ShowBottomAxis");
				bool showRight = info.GetBoolean("ShowRightAxis");
				bool showTop = info.GetBoolean("ShowTopAxis");

				s._axisStyles.AxisStyleEnsured(CSLineID.Y0).AxisLineStyle = (AxisLineStyle)info.GetValue("LeftAxisStyle", s);
				s._axisStyles.AxisStyleEnsured(CSLineID.X0).AxisLineStyle = (AxisLineStyle)info.GetValue("BottomAxisStyle", s);
				s._axisStyles.AxisStyleEnsured(CSLineID.Y1).AxisLineStyle = (AxisLineStyle)info.GetValue("RightAxisStyle", s);
				s._axisStyles.AxisStyleEnsured(CSLineID.X1).AxisLineStyle = (AxisLineStyle)info.GetValue("TopAxisStyle", s);

				s._axisStyles[CSLineID.Y0].MajorLabelStyle = (AxisLabelStyle)info.GetValue("LeftLabelStyle", s);
				s._axisStyles[CSLineID.X0].MajorLabelStyle = (AxisLabelStyle)info.GetValue("BottomLabelStyle", s);
				s._axisStyles[CSLineID.Y1].MajorLabelStyle = (AxisLabelStyle)info.GetValue("RightLabelStyle", s);
				s._axisStyles[CSLineID.X1].MajorLabelStyle = (AxisLabelStyle)info.GetValue("TopLabelStyle", s);

				// Titles and legend
				s._axisStyles[CSLineID.Y0].Title = (TextGraphic)info.GetValue("LeftAxisTitle", s);
				s._axisStyles[CSLineID.X0].Title = (TextGraphic)info.GetValue("BottomAxisTitle", s);
				s._axisStyles[CSLineID.Y1].Title = (TextGraphic)info.GetValue("RightAxisTitle", s);
				s._axisStyles[CSLineID.X1].Title = (TextGraphic)info.GetValue("TopAxisTitle", s);

				if (!showLeft)
					s._axisStyles.Remove(CSLineID.Y0);
				if (!showRight)
					s._axisStyles.Remove(CSLineID.Y1);
				if (!showBottom)
					s._axisStyles.Remove(CSLineID.X0);
				if (!showTop)
					s._axisStyles.Remove(CSLineID.X1);

				var legend = (TextGraphic)info.GetValue("Legend", s);

				// XYPlotLayer specific
				object linkedLayer = info.GetValue("LinkedLayer", s);
				if (linkedLayer is Main.AbsoluteDocumentPath)
				{
					ProvideLinkedScalesWithLinkedLayerIndex(s, (Main.AbsoluteDocumentPath)linkedLayer, info);
				}
				else if (linkedLayer is Main.RelativeDocumentPath)
				{
					ProvideLinkedScalesWithLinkedLayerIndex(s, (Main.RelativeDocumentPath)linkedLayer, info);
				}
				s.GraphObjects.AddRange((IEnumerable<IGraphicBase>)info.GetValue("GraphObjects", s));

				s._plotItems = (PlotItemCollection)info.GetValue("Plots", s);
				if (null != s._plotItems) s._plotItems.ParentObject = s;

				if (null != legend)
				{
					var legend1 = new LegendText(legend);
//.........这里部分代码省略.........
开发者ID:Altaxo,项目名称:Altaxo,代码行数:101,代码来源:XYPlotLayer_Serialization.cs

示例15: Deserialize

			public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
			{
				var s = (TextGraphic)o ?? new TextGraphic(info);

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

				s._text = info.GetString("Text");
				s._font = (FontX3D)info.GetValue("Font", s);
				s._textBrush = (IMaterial)info.GetValue("Brush", s);
				s.Background = (IBackgroundStyle)info.GetValue("BackgroundStyle", s);
				s._lineSpacingFactor = info.GetSingle("LineSpacing");

				s.UpdateTransformationMatrix();

				return s;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:16,代码来源:TextGraphic.cs


注:本文中的Altaxo.GetSingle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。