Ejemplo n.º 1
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinearScale s = null != o ? (LinearScale)o : new LinearScale();

                s._baseOrg = (double)info.GetDouble("BaseOrg");
                s._baseEnd = (double)info.GetDouble("BaseEnd");

                s._majorSpan  = (double)info.GetDouble("MajorSpan");
                s._minorTicks = (int)info.GetInt32("MinorTicks");

                s._axisOrgByMajor = (double)info.GetDouble("OrgByMajor");
                s._axisEndByMajor = (double)info.GetDouble("EndByMajor");

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

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

                s.SetCachedValues();
                // restore the event chain
                s._dataBounds.BoundaryChanged += new BoundaryChangedHandler(s.OnBoundariesChanged);

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

                return(s);
            }