?? form1.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 + -