44 lines
952 B
C#
44 lines
952 B
C#
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();
|
|
}
|
|
}
|
|
}
|