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