本文整理汇总了C#中ITime.ShowData方法的典型用法代码示例。如果您正苦于以下问题:C# ITime.ShowData方法的具体用法?C# ITime.ShowData怎么用?C# ITime.ShowData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITime
的用法示例。
在下文中一共展示了ITime.ShowData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowTime
private void ShowTime(int unit)
{
if (_ITime != null)
{
Controls.Remove(_ITime.Control);
}
switch (unit)
{
case CGtd.UNIT_SECOND:
if (_UcSecond == null)
{
_UcSecond = new UcSecond();
_UcSecond.Init(DtStart.Value);
InitView(_UcSecond);
}
_Editor.StopEnabled = true;
_ITime = _UcSecond;
break;
case CGtd.UNIT_MINUTE:
if (_UcMinute == null)
{
_UcMinute = new UcMinute();
_UcMinute.Init(DtStart.Value);
InitView(_UcMinute);
}
_Editor.StopEnabled = true;
_ITime = _UcMinute;
break;
case CGtd.UNIT_HOUR:
if (_UcHour == null)
{
_UcHour = new UcHour();
_UcHour.Init(DtStart.Value);
InitView(_UcHour);
}
_Editor.StopEnabled = true;
_ITime = _UcHour;
break;
case CGtd.UNIT_DAY:
if (_UcDay == null)
{
_UcDay = new UcDay();
_UcDay.Init(DtStart.Value);
InitView(_UcDay);
}
_Editor.StopEnabled = true;
_ITime = _UcDay;
break;
case CGtd.UNIT_WEEK:
if (_UcWeek == null)
{
_UcWeek = new UcWeek();
_UcWeek.Init(DtStart.Value);
InitView(_UcWeek);
}
_Editor.StopEnabled = true;
_ITime = _UcWeek;
break;
case CGtd.UNIT_MONTH:
if (_UcMonth == null)
{
_UcMonth = new UcMonth();
_UcMonth.Init(DtStart.Value);
InitView(_UcMonth);
}
_Editor.StopEnabled = true;
_ITime = _UcMonth;
break;
case CGtd.UNIT_YEAR:
if (_UcYear == null)
{
_UcYear = new UcYear();
_UcYear.Init(DtStart.Value);
InitView(_UcYear);
}
_Editor.StopEnabled = true;
_ITime = _UcYear;
break;
default:
if (_UcNone == null)
{
_UcNone = new UcNone();
_UcNone.Init(DtStart.Value);
InitView(_UcNone);
}
_Editor.StopEnabled = false;
_ITime = _UcNone;
return;
}
Controls.Add(_ITime.Control);
_ITime.ShowData(MGtd);
}