本文整理匯總了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;
}