optimise files
This commit is contained in:
43
CS/19_6/Form1.cs
Normal file
43
CS/19_6/Form1.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace _19_6
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
Random r;
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
r = new Random();
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
timer1.Start();
|
||||
}
|
||||
|
||||
private void button2_Click(object sender, EventArgs e)
|
||||
{
|
||||
timer1.Stop();
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
label1.Text = r.Next(1,8).ToString();
|
||||
label2.Text = r.Next(1, 8).ToString();
|
||||
label3.Text = r.Next(1, 8).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user