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

                Edge edge = (Edge)info.GetValue("Edge", s);

                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");
                bool bOuterMajorTicks = (bool)info.GetBoolean("MajorOuter");
                bool bInnerMajorTicks = (bool)info.GetBoolean("MajorInner");
                bool bOuterMinorTicks = (bool)info.GetBoolean("MinorOuter");
                bool bInnerMinorTicks = (bool)info.GetBoolean("MinorInner");

                s._axisPosition = (Calc.RelativeOrAbsoluteValue)info.GetValue("AxisPosition", s);

                if (edge.TypeOfEdge == EdgeType.Top || edge.TypeOfEdge == EdgeType.Right)
                {
                    s._showFirstUpMajorTicks   = bOuterMajorTicks;
                    s._showFirstDownMajorTicks = bInnerMajorTicks;
                    s._showFirstUpMinorTicks   = bOuterMinorTicks;
                    s._showFirstDownMinorTicks = bInnerMinorTicks;
                }
                else
                {
                    s._showFirstUpMajorTicks   = bInnerMajorTicks;
                    s._showFirstDownMajorTicks = bOuterMajorTicks;
                    s._showFirstUpMinorTicks   = bInnerMinorTicks;
                    s._showFirstDownMinorTicks = bOuterMinorTicks;
                }

                s.WireEventChain(true);

                return(s);
            }