日期:2014-05-17 浏览次数:21345 次
private void btn_end_Click(object sender, EventArgs e)
{
timer1.Stop();
timer1.Enabled = false;
timer1.Dispose();
}
long sec = 1800;
private void timer1_Tick(object sender, EventArgs e)
{
sec -= 1;
this.lb_time.Text= new DateTime(sec * 1000000).ToLongTimeString();
if (sec == 300 )
{
this.lb_zff.Text = "最后30秒!";
this.axWindowsMediaPlayer1.URL = "D:\\ding.wav";
}
if (sec == 0)
{
timer1.Stop();
this.lb_zff.Text = "时间到!";
this.axWindowsMediaPlayer1.URL= "D:\\ling.wav";
}
private void btn_start_Click(object sender, EventArgs e)
{
if (timer1.Enabled)
{
timer1.Stop();
}
else
{