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


C# AltaxoVariant.ToDouble方法代码示例

本文整理汇总了C#中Altaxo.Data.AltaxoVariant.ToDouble方法的典型用法代码示例。如果您正苦于以下问题:C# AltaxoVariant.ToDouble方法的具体用法?C# AltaxoVariant.ToDouble怎么用?C# AltaxoVariant.ToDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Altaxo.Data.AltaxoVariant的用法示例。


在下文中一共展示了AltaxoVariant.ToDouble方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetValueAt

		// indexers
		public override void SetValueAt(int i, AltaxoVariant val)
		{
			try
			{
				this[i] = val.ToDouble();
			}
			catch (Exception ex)
			{
				throw new ApplicationException(string.Format("Error: Try to set {0}[{1}] with the string {2}, exception: {3}", this.TypeAndName, i, val.ToString(), ex.Message));
			}
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:12,代码来源:DoubleColumn.cs

示例2: ProcessDataBounds

		/// <summary>
		/// calculates the axis org and end using the databounds
		/// the org / end is adjusted only if it is not fixed
		/// and the DataBound object contains valid data
		/// </summary>
		public override void ProcessDataBounds(AltaxoVariant org, bool orgfixed, AltaxoVariant end, bool endfixed)
		{
			double dorg = org.ToDouble();
			double dend = end.ToDouble();

			ProcessDataBounds(dorg, orgfixed, dend, endfixed);
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:12,代码来源:NumericalScale.cs

示例3: SetValueAt

 // indexers
 public override void SetValueAt(int i, AltaxoVariant val)
 {
   if(val.IsType(AltaxoVariant.Content.VDouble))
     this[i] = val.m_Double;
   else if(val.CanConvertedToDouble)
     this[i] = val.ToDouble();
   else
     throw new ApplicationException("Error: Try to set " + this.TypeAndName + "[" + i + "] with the string " + val.ToString());
 }
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:10,代码来源:DoubleColumn.cs

示例4: ProcessDataBounds

		/// <summary>
		/// calculates the axis org and end using the databounds
		/// the org / end is adjusted only if it is not fixed
		/// and the DataBound object contains valid data
		/// </summary>
		public override void ProcessDataBounds(AltaxoVariant org, bool orgfixed, AltaxoVariant end, bool endfixed)
		{
			DateTime dorg;
			DateTime dend;
			if (org.IsType(AltaxoVariant.Content.VDateTime))
				dorg = (DateTime)org;
			else if (org.CanConvertedToDouble)
				dorg = new DateTime((long)(org.ToDouble() * 1E7));
			else
				throw new ArgumentException("Variant org is not a DateTime nor a numeric value");

			if (end.IsType(AltaxoVariant.Content.VDateTime))
				dend = (DateTime)end;
			else if (end.CanConvertedToDouble)
				dend = new DateTime((long)(end.ToDouble() * 1E7));
			else
				throw new ArgumentException("Variant end is not a DateTime nor a numeric value");

			ProcessDataBounds(dorg, orgfixed, dend, endfixed);
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:25,代码来源:DateTimeScale.cs


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