⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.cs

📁 雙色球分析
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace emie
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            skinEngine1.SkinFile = "MP10.ssk";
        }
        int i = 0;
        private void button1_Click(object sender, EventArgs e)
        {
            if (i % 2 == 0)
            {
                button1.Text = "抽 奖";
                i++;
                timer1.Start();
            }
            else
            {
                button1.Text = "开 始";
                i++;
                timer1.Stop();
            }
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            Random rand = new Random();
            int a1 = rand.Next(1, 32);
            int a2 = rand.Next(1, 32);
            int a3 = rand.Next(1, 32);
            int a4 = rand.Next(1, 32);
            int a8 = rand.Next(1, 32);
            int a7 = rand.Next(1, 32);
            int a6 = rand.Next(1, 16);
            if (a1 > 0 && a1 < 10)
            {
                textBox1.Text = "0" + a1.ToString();
            }
            else
            {
                textBox1.Text = a1.ToString();
            }
            if (a2 > 0 && a2 < 10)
            {
                textBox2.Text = "0" + a2.ToString();
            }
            else
            {
                textBox2.Text = a2.ToString();
            }
            if (a3 > 0 && a3 < 10)
            {
                textBox3.Text = "0" + a3.ToString();
            }
            else
            {
                textBox3.Text = a3.ToString();
            }
            if (a4 > 0 && a4 < 10)
            {
                textBox4.Text = "0" + a4.ToString();
            }
            else
            {
                textBox4.Text = a4.ToString();
            }
            if (a8 > 0 && a8 < 10)
            {
                textBox8.Text = "0" + a8.ToString();
            }
            else
            {
                textBox8.Text = a8.ToString();
            }
            if (a7 > 0 && a7 < 10)
            {
                textBox7.Text = "0" + a7.ToString();
            }
            else
            {
                textBox7.Text = a7.ToString();
            }
            if (a6 > 0 && a6 < 10)
            {
                textBox6.Text = "0" + a6.ToString();
            }
            else
            {
                textBox6.Text = a6.ToString();
            }   
            
            
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -