나는 옵션을 똑딱 거리며 초시계와 카운트 다운으로 작동하는 크로노 미터 양식 응용 프로그램을 만들려고합니다. 문제는 내가 밀리 초를 그릴 수없는 것입니다. 는 현재의 밀리 초없이 틱 방법은 다음과 같습니다크로노 미터 만들기 C#
private void timer_Tick(object sender, EventArgs e)
{
if (timespan.TotalSeconds > 0)
{
timespan = timespan.Add(new TimeSpan(0, 0, -1));
updateNumericUpDowns();
}
else
{
timerCountown.Stop();
}
}
UI를 업데이트하는 방법 :
private void updateNumericUpDowns()
{
numericUpDownSeconds.Value = Convert.ToInt32(timespan.Seconds);
numericUpDownMinutes.Value = Convert.ToInt32(timespan.Minutes);
numericUpDownHours.Value = Convert.ToInt32(timespan.Hours);
}
도움말이 감사합니다, TNX 모두!
'timespan'은 어디에 정의되어 있습니까? –
정확하지 않을 것입니다. – SLaks