using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
int i, j;
public Form1()
{
InitializeComponent();
i = 0;
}
private void timer1_Tick(object sender, EventArgs e)
{
i++;
i = i % 3;
label1.Text = Convert.ToString(i);
button1.Enabled = false;
button2.Enabled = false;
button3.Enabled = false;
j++;
j = j % 3;
switch (j)
{
case 0:
button1.Enabled = true;
timer1.Interval = 300;
break;
case 1:
button2.Enabled = true;
timer1.Interval = 300;
break;
case 2:
button3.Enabled = true;
timer1.Interval = 3000;
break;
}
}
}
}
沒有留言:
張貼留言