简单设计一个winform界面,只需要一个button和6个文本框
Random r = new Random();//创建随机数,用于生成双色球号码
List<int> lt = new List<int>();//创建集合,用于保存生成的号码
int temp;
bool b = false;//按钮标记
private void Form1_Load(object sender, EventArgs e)
{
//初始化窗口
Control.CheckForIllegalCrossThreadCalls = false;
button1.Text = "开始";
label1.Text = "Red1";
label2.Text = "Red2";
label3.Text = "Red3";
label4.Text = "Red4";
label5.Text = "Red5";
label6.Text = "Red6";
label7.Text = "Blue";
}
public void Run()//生成号码的程序
{
while (b==true)
{
lt.Clear