本文整理汇总了C#中Altaxo.GetTimeSpan方法的典型用法代码示例。如果您正苦于以下问题:C# Altaxo.GetTimeSpan方法的具体用法?C# Altaxo.GetTimeSpan怎么用?C# Altaxo.GetTimeSpan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Altaxo
的用法示例。
在下文中一共展示了Altaxo.GetTimeSpan方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
{
DateTimeAxisRescaleConditions s = null!=o ? (DateTimeAxisRescaleConditions)o : new DateTimeAxisRescaleConditions();
s._orgRescaling = (BoundaryRescaling)info.GetEnum("OrgRescaling",typeof(BoundaryRescaling));
s._org = info.GetDateTime("Org");
s._endRescaling = (BoundaryRescaling)info.GetEnum("EndRescaling",typeof(BoundaryRescaling));
s._end = info.GetDateTime("End");
s._spanRescaling = (BoundaryRescaling)info.GetEnum("SpanRescaling",typeof(BoundaryRescaling));
s._span = info.GetTimeSpan("Span");
return s;
}
示例2: Deserialize
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;
}
示例3: SDeserialize
protected virtual DateTimeScale SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
{
DateTimeScale s = null != o ? (DateTimeScale)o : new DateTimeScale();
s._axisOrg = info.GetDateTime("Org");
s._axisEnd = info.GetDateTime("End");
Unit spanUnit = (Unit)info.GetEnum("MajorSpanUnit", typeof(Unit));
TimeSpan span = info.GetTimeSpan("MajorSpanValue");
s._majorSpan = new SpanCompound(spanUnit, span);
s._minorTicks = info.GetInt32("MinorTicks");
s.InternalSetDataBounds((FiniteDateTimeBoundaries)info.GetValue("Bounds", s));
s.InternalSetRescaling((DateTimeScaleRescaleConditions)info.GetValue("Rescaling", s));
return s;
}