Archived
1
0
This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SomeLab/CS/19_6/Form1.cs
2025-11-25 20:14:10 +08:00

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();
}
}
}