开发工具:
文件大小: 4kb
下载次数: 0
上传时间: 2012-10-23
详细说明: 可以机选福利彩票和体育彩票 public partial class 福利彩票 : Form { public 福利彩票(彩票机选 newFrom) { InitializeComponent(); MdiParent = newFrom; } static Random rd = new Random(); static List myshuzi = new List();//定义一个泛型集合类 static bool myBool; static void ShuangSeQiuFangFa() { myBool = true; while (myBool) { myBool = false; myshuzi.Clear(); for (int i = 0; i < 6; i++) { myshuzi.Add(new shuzi(rd.Next(1, 34))); } for (int i = 0; i < 5; i++) { for (int j = i + 1; j < 6; j++) { if (myshuzi[j].x == myshuzi[i].x ) { myBool = true; } } } } Comparison sorter = new Comparison (paixu.Compare); myshuzi.Sort(sorter); } static void QiLeCaiFangFa() { myBool = true; while (myBool) { myBool = false; myshuzi.Clear(); for (int i = 0; i < 7; i++) { myshuzi.Add(new shuzi(rd.Next(1, 31))); } for (int i = 0; i < 6; i++) { for (int j = i + 1; j < 7; j++) { if (myshuzi[j].x == myshuzi[i].x) { myBool = true; } } } } Comparison sorter = new Comparison (paixu.Compare); myshuzi.Sort(sorter); } private void button3D_Click(object sender, EventArgs e) { textBox1.Text = rd.Next(0, 10).ToString(); textBox2.Text = rd.Next(0, 10).ToString(); textBox3.Text = rd.Next(0, 10).ToString(); } private void buttonshuangseqiu_Click(object sender, EventArgs e) { ShuangSeQiuFangFa(); textBox4.Text = myshuzi[0].x .ToString (); textBox5.Text = myshuzi[1].x.ToString(); textBox6.Text = myshuzi[2].x.ToString(); textBox7.Text = myshuzi[3].x.ToString(); textBox8.Text = myshuzi[4].x.ToString(); textBox9.Text = myshuzi[5].x.ToString(); textBox10.Text = rd.Next(1, 17).ToString(); } private void buttonqilecai_Click(object sender, EventArgs e) { QiLeCaiFangFa(); textBox17.Text = myshuzi[0].x.ToString(); textBox16.Text = myshuzi[1].x.ToString(); textBox15.Text = myshuzi[2].x.ToString(); textBox14.Text = myshuzi[3].x.ToString(); textBox13.Text = myshuzi[4].x.ToString(); textBox12.Text = myshuzi[5].x.ToString(); textBox11.Text = myshuzi[6].x.ToString(); textBox18.Text = rd.Next(1, 31).ToString(); } } ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.