예제 #1
0
파일: TextScale.cs 프로젝트: olesar/Altaxo
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                TextScale s = null != o ? (TextScale)o : new TextScale(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, (TextBoundaries)info.GetValue("Bounds", s));
                s.ChildSetMember(ref s._tickSpacing, new Ticks.TextTickSpacing());

                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);
            }
예제 #2
0
파일: TextScale.cs 프로젝트: olesar/Altaxo
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                TextScale s = null != o ? (TextScale)o : new TextScale(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, (TextBoundaries)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);
            }