• 大小: 2.39M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-05
  • 语言: 其他
  • 标签: 其他  

资源简介

0kyngz.zip

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Collections;
using System.Windows.Forms;
using System.Data.SqlClient;
using zhushou;
//using System.Collections;
namespace zhushou
{
    public partial class _22X5 : Form
    {
        public static int count;
        public string str;
        public string str1;
        public List ls = new List();
        public _22X5()
        {
            InitializeComponent();
        }
        ArrayList num_listsj = new ArrayList();
        ArrayList num_listdt = new ArrayList();

        //定义7个int变量接收6个随机值
        int num1 num2 num3 num4 num5;

        //定义7个String变量接收更改类型的随机数,用于在个位数前加0
        string value1 value2 value3 value4 value5;
        private void button1_Click(object sender EventArgs e)
        {
            string h = ““;
            if (textBox6.Text == ““)
                MessageBox.Show(“请输入注数“);
            else
            {
                textBox1.Text = ““;
                int p = Convert.ToInt32(textBox6.Text);
                Random rd = new Random();

                for (int j = 0; j < p; j++)
                {
                    do
                    {
                        //获得6个随机数
                        num1 = rd.Next(1 22);
                        num2 = rd.Next(1 22);
                        num3 = rd.Next(1 22);
                        num4 = rd.Next(1 22);
                        num5 = rd.Next(1 22);


                    } while (GetSame(num1 num2 num3 num4 num5));//调用判断6个数是否重复的方法

                    //用数组接收6个数,方便以后调用
                    int[] nums = { num1 num2 num3 num4 num5 };
                    value1 = num1.ToString();
                    value2 = num2.ToString();
                    value3 = num3.ToString();
                    value4 = num4.ToString();
                    value5 = num5.ToString();
                    string[] values = { value1 value2 value3 value4 value5 };
                    //当获得的数小于10的时候,在前面加上0
                    for (int i = 0; i < nums.Length; i++)
                    {
                        if (nums[i] < 10)
                        {
                            values[i] = “0“ + nums[i].ToString();
                        }

                    }
                    h = values[0] + “-“ + values[1] + “-“ + values[2] + “-“ + values[3] + “-“ + values[4];
                    textBox1.Text = textBox1.Text + “\r\n “ + h;
                    string strsj = h;
                    num_listsj.Add(strsj);
                }

            }
        }


        private bool GetSame(int num1 int num2 int num3 int num4 int num5)
        {
            int count = 0;
            int[] values = { num1 num2 num3 num4 num5 };
            for (int i = 0; i < values.Length - 1; i++)
            {
    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-05-01 23:12  选号助手源代码\
     目录           0  2013-05-01 23:12  选号助手源代码\zhushou\
     文件     3145728  2013-05-04 21:03  选号助手源代码\zhushou\wo_zhushou.mdf
     文件     1048576  2013-05-04 21:03  选号助手源代码\zhushou\wo_zhushou_log.ldf
     目录           0  2013-05-01 23:13  选号助手源代码\zhushou\zhushou\
     文件       10660  2013-04-29 14:53  选号助手源代码\zhushou\zhushou\22X5.cs
     文件       15428  2013-04-29 14:53  选号助手源代码\zhushou\zhushou\22X5.designer.cs
     文件        5817  2013-04-19 23:03  选号助手源代码\zhushou\zhushou\22X5.resx
     文件       11843  2013-04-29 15:15  选号助手源代码\zhushou\zhushou\31X7.cs
     文件       15937  2013-04-29 14:53  选号助手源代码\zhushou\zhushou\31X7.designer.cs
     文件        5817  2013-04-19 23:18  选号助手源代码\zhushou\zhushou\31X7.resx
     文件       27057  2013-05-01 22:23  选号助手源代码\zhushou\zhushou\3D.cs
     文件       86627  2013-05-01 21:21  选号助手源代码\zhushou\zhushou\3D.designer.cs
     文件        5817  2013-05-01 21:21  选号助手源代码\zhushou\zhushou\3D.resx
     文件       17908  2013-05-01 21:50  选号助手源代码\zhushou\zhushou\CJDLT.cs
     文件       33732  2013-05-01 21:37  选号助手源代码\zhushou\zhushou\CJDLT.designer.cs
     文件        6011  2013-05-01 21:37  选号助手源代码\zhushou\zhushou\CJDLT.resx
     文件        3819  2013-05-01 21:50  选号助手源代码\zhushou\zhushou\Class1.cs
     文件         557  2013-04-29 14:53  选号助手源代码\zhushou\zhushou\Class2.cs
     文件        8226  2013-04-29 14:53  选号助手源代码\zhushou\zhushou\PL3.cs
     文件       17637  2013-04-29 14:53  选号助手源代码\zhushou\zhushou\PL3.designer.cs
     文件        5817  2013-04-22 16:48  选号助手源代码\zhushou\zhushou\PL3.resx
     文件        6999  2013-04-29 14:53  选号助手源代码\zhushou\zhushou\PL5.cs
     文件       12481  2013-04-29 14:53  选号助手源代码\zhushou\zhushou\PL5.designer.cs
     文件        5817  2013-04-22 11:20  选号助手源代码\zhushou\zhushou\PL5.resx
     文件         487  2013-04-09 21:37  选号助手源代码\zhushou\zhushou\Program.cs
     目录           0  2013-05-01 23:13  选号助手源代码\zhushou\zhushou\Properties\
     文件        1346  2013-04-09 21:37  选号助手源代码\zhushou\zhushou\Properties\AssemblyInfo.cs
     文件        2864  2013-04-09 21:37  选号助手源代码\zhushou\zhushou\Properties\Resources.Designer.cs
     文件        5612  2013-04-09 21:37  选号助手源代码\zhushou\zhushou\Properties\Resources.resx
     文件        1704  2013-04-09 21:37  选号助手源代码\zhushou\zhushou\Properties\Settings.Designer.cs
............此处省略70个文件信息

评论

共有 条评论