本文整理汇总了C#中ZedGraph.XDate.AddMilliseconds方法的典型用法代码示例。如果您正苦于以下问题:C# XDate.AddMilliseconds方法的具体用法?C# XDate.AddMilliseconds怎么用?C# XDate.AddMilliseconds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZedGraph.XDate
的用法示例。
在下文中一共展示了XDate.AddMilliseconds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CalcMajorTicValue
/// <summary>
/// Determine the value for any major tic.
/// </summary>
/// <remarks>
/// This method properly accounts for <see cref="Scale.IsLog"/>, <see cref="Scale.IsText"/>,
/// and other axis format settings.
/// </remarks>
/// <param name="baseVal">
/// The value of the first major tic (floating point double)
/// </param>
/// <param name="tic">
/// The major tic number (0 = first major tic). For log scales, this is the actual power of 10.
/// </param>
/// <returns>
/// The specified major tic value (floating point double).
/// </returns>
internal override double CalcMajorTicValue(double baseVal, double tic)
{
XDate xDate = new XDate(baseVal);
switch (_majorUnit) {
case DateUnit.Year:
default:
xDate.AddYears(tic*_majorStep);
break;
case DateUnit.Month:
xDate.AddMonths(tic*_majorStep);
break;
case DateUnit.Day:
xDate.AddDays(tic*_majorStep);
break;
case DateUnit.Hour:
xDate.AddHours(tic*_majorStep);
break;
case DateUnit.Minute:
xDate.AddMinutes(tic*_majorStep);
break;
case DateUnit.Second:
xDate.AddSeconds(tic*_majorStep);
break;
case DateUnit.Millisecond:
xDate.AddMilliseconds(tic*_majorStep);
break;
}
return xDate.XLDate;
}