int mint = 10;
        int scss = 59;
        private void time_s_Load(object sender, EventArgs e)
        {
  
            label1.Text = string.Empty;
            this.timer1.Interval =1000;
            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
            this.timer1.Start();        }        private void timer1_Tick(object sender, EventArgs e)
        {
            if (mint >=0)
            {                scss--;
                if (scss == 0)
                {
                    mint--;
                    label1.Text = mint.ToString();
                    scss = 59;
                } label2.Text = scss.ToString();
            }        }   这样的倒计时怎么是间隔2秒!

解决方案 »

  1.   


                    int seed = 1000;//设置间隔秒数
                    //以下使用System.Timers.Timer类
                    System.Timers.Timer myTimer = new System.Timers.Timer(seed);  //实例化Timer类
                    myTimer.Enabled = true;  //是否执行System.Timers.Timer.Elapsed事件;
                    myTimer.Elapsed += new System.Timers.ElapsedEventHandler(myTimer_Function); //到达时间的时候执行事件myTimer_Function;
                    myTimer.AutoReset = true;  //设置是执行一次(false)还是一直执行(true);
             /// <summary>
            /// 被定时器调用的方法
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            private void myTimer_Function(object sender, System.Timers.ElapsedEventArgs e)
            {
    //你要操作的代码
            }
      

  2.   

    把  this.timer1.Tick += new System.EventHandler(this.timer1_Tick);去掉就行了!
      

  3.   

    你新建页面,只拖3个控件:2个label,一个timer,然后把代码拷上去,就是1秒;如果你设置了在form页面设置了timer的click事件为timer1_Tick,这样相当于timer1_Tick调用了2次,就是2秒了。另外,你的代码分钟没显示出来,可以修改timer1_Tick如下:
    private void timer1_Tick(object sender, EventArgs e)
            {
                if (mint >= 0 && scss > 0)
                {
                    scss--;
                    if (scss == 0)
                    {
                        mint--;
                        scss = 59;
                    }
                    label1.Text = mint.ToString();
                    label2.Text = scss.ToString();
                }
            }   
      

  4.   

    this.timer1.Tick += new System.EventHandler(this.timer1_Tick);楼主我99.9999999999%肯定在designer.cs文件中还有这样一句话