当前位置: 首页>>代码示例>>C#>>正文


C# Altaxo.GetTimeSpan方法代码示例

本文整理汇总了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;
      }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:13,代码来源:DateTimeAxisRescaleConditions.cs

示例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;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:31,代码来源:DateTimeScaleRescaleConditions.cs

示例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;
			}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:15,代码来源:DateTimeScale.cs


注:本文中的Altaxo.GetTimeSpan方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。