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

                s._cachedAxisOrg       = info.GetDouble("Org");
                s._cachedAxisEnd       = info.GetDouble("End");
                s._cachedAxisSpan      = s._cachedAxisEnd - s._cachedAxisOrg;
                s._cachedOneByAxisSpan = 1 / s._cachedAxisSpan;

                s.ChildSetMember(ref s._rescaling, (NumericScaleRescaleConditions)info.GetValue("Rescaling", s));

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

                s.ChildSetMember(ref s._tickSpacing, new Ticks.LinearTickSpacing());

                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);
            }
Ejemplo n.º 2
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinearScale s = (LinearScale)o ?? new LinearScale(info);

                s._cachedAxisOrg       = info.GetDouble("Org");
                s._cachedAxisEnd       = info.GetDouble("End");
                s._cachedAxisSpan      = s._cachedAxisEnd - s._cachedAxisOrg;
                s._cachedOneByAxisSpan = 1 / s._cachedAxisSpan;

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

                s.ChildSetMember(ref s._rescaling, (NumericScaleRescaleConditions)info.GetValue("Rescaling", s));

                s.ChildSetMember(ref s._tickSpacing, (Ticks.TickSpacing)info.GetValue("TickSpacing", s));

                s.UpdateTicksAndOrgEndUsingRescalingObject();

                return(s);
            }