20150511---Timer计时器(备忘)
private void timer1_Tick(object sender, EventArgs e) { TimeSpan ts = new TimeSpan(0, 0, 0); string str = ts.Hours + ":" + ts.Minutes + ":" + ts.Seconds; labtime.Text = str; ts = ts.Subtract(new TimeSpan(0, 0, -1)); }
注:TimeSpan主要用来进行倒计时。