推盤
public partial class Form1 : Form
{
int rndmoney1, rndmoney2, rndmoney3, rndmoney4, rndmoney5, rndmoney6, rndmoney7, rndmoney8, rndmoney9;
public Form1()
{
InitializeComponent();
}
private void button9_Click(object sender, EventArgs e)
{
}
private void button4_Click(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
private void button10_Click(object sender, EventArgs e)
{
Random rnd = new Random();
//rndmoney1=rnd.Next(0,10);//button1.Text = "4";
//rndmoney2=rnd.Next(0,10);//button2.Text = "4";
//rndmoney3=rnd.Next(0,10);//button3.Text = "4";
//rndmoney4=rnd.Next(0,10);//button4.Text = "0";
//rndmoney5=rnd.Next(0,10);//button5.Text = "4";
//rndmoney6=rnd.Next(0,10);//button6.Text = "9";
//rndmoney7=rnd.Next(0,10);//button7.Text = "9";
//rndmoney8=rnd.Next(0,10);//button8.Text = "2";
//rndmoney9 = rnd.Next(0, 10);//button9.Text = "8";
button1.Text = rndmoney1.ToString();
button2.Text = rndmoney2.ToString();
if (rndmoney1 == rndmoney2)
{
MessageBox.Show("Dot Net Perls is awesome");
rndmoney2 = rnd.Next(0, 9);
button2.Text = rndmoney2.ToString();
}
button3.Text = rndmoney3.ToString();
if (rndmoney3 == rndmoney2 || rndmoney3==rndmoney1)
{
MessageBox.Show("Dot Net Perls is awesome");
rndmoney3 = rnd.Next(0, 9);
button3.Text = rndmoney3.ToString();
}
//button4.Text = rndmoney4.ToString();
//button5.Text = rndmoney5.ToString();
//button6.Text = rndmoney6.ToString();
//button7.Text = rndmoney7.ToString();
//button8.Text = rndmoney8.ToString();
//button9.Text = rndmoney9.ToString();
button1.Enabled = false;
button2.Enabled = false;
button3.Enabled = false;
button4.Enabled = false;
button5.Enabled = false;
button6.Enabled = false;
button7.Enabled = false;
button8.Enabled = false;
button9.Enabled = false;
沒有留言:
張貼留言