Beispiel #1
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                DateTimeScaleRescaleConditions s = null != o ? (DateTimeScaleRescaleConditions)o : new DateTimeScaleRescaleConditions();

                s._userProvidedOrgRelativeTo = BoundariesRelativeTo.Absolute;
                s._userProvidedEndRelativeTo = BoundariesRelativeTo.Absolute;

                var orgRescaling  = (BoundaryRescaling)(int)info.GetEnum("OrgRescaling", typeof(BoundaryRescalingV1));
                var org           = info.GetDateTime("Org");
                var endRescaling  = (BoundaryRescaling)(int)info.GetEnum("EndRescaling", typeof(BoundaryRescalingV1));
                var end           = info.GetDateTime("End");
                var spanRescaling = (BoundaryRescaling)(int)info.GetEnum("SpanRescaling", typeof(BoundaryRescalingV1));
                var span          = info.GetTimeSpan("Span");

                if (4 == (int)orgRescaling)
                {
                    orgRescaling = BoundaryRescaling.Auto;
                }
                if (4 == (int)endRescaling)
                {
                    endRescaling = BoundaryRescaling.Auto;
                }

                s._orgRescaling                = orgRescaling;
                s._endRescaling                = endRescaling;
                s._userProvidedOrgValue        = org.Ticks;
                s._userProvidedEndValue        = end.Ticks;
                s._userProvidedOrgDateTimeKind = org.Kind;
                s._userProvidedEndDateTimeKind = end.Kind;

                s._resultingOrg = org.Ticks;
                s._resultingEnd = end.Ticks;

                return(s);
            }
Beispiel #2
0
 public DateTimeScaleRescaleConditions(DateTimeScaleRescaleConditions from)
 {
     CopyFrom(from);
 }
		public DateTimeScaleRescaleConditions(DateTimeScaleRescaleConditions from)
		{
			CopyFrom(from);
		}