示例#1
0
文件: Form1.cs 项目: tigran338/Tetris
 public void _Time(object sender, EventArgs e)
 {
     if (!a.Move())
     {
         a = new Shape(panel1, label1, label2, button2);
         a.Creat(rn.Next(7));
     }
 }
示例#2
0
文件: Form1.cs 项目: tigran338/Tetris
 private void button1_Click(object sender, EventArgs e)
 {
     label3.Visible   = false;
     label4.Visible   = false;
     button1.Visible  = false;
     textBox1.Visible = false;
     label1.Visible   = true;
     a = new Shape(panel1, label1, label2, button2);
     a.Creat(rn.Next(7));
     TimerT         = new Timer();
     TimerT.Enabled = true;
     try
     {
         TimerT.Interval = int.Parse(textBox1.Text);
     }
     catch { TimerT.Interval = 400; }
     TimerT.Tick += new System.EventHandler(_Time);
     TimerT.Start();
 }