Timer可以这样使用

 

static void timer_Tick ( object sender, EventArgs e )

{

    Timer timer = sender as Timer;

    timer.Enabled = false;

    try

    {

        // TODO:

    }

    finally

    {

        timer.Enabled = true;

    }

}

 

...

posted on 2011-11-04 10:44  白开水易拉罐  阅读(183)  评论(0编辑  收藏  举报