close

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
int c1 , d1, rndmoney1 = 1000, rndmoney2 = 1000, rndmoney3=1000;
int c2 , d2 , c3 , d3 ;
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
c1 = c1 + 1;
d1 = c1 % 10;
button1.Text= d1.ToString();
}

private void timer1_Tick(object sender, EventArgs e)
{
c1 = c1 + 1;
d1 = c1 % 10;
button1.Text = d1.ToString();
if (d1 == rndmoney1) timer1.Enabled = false;


}
private void button2_Click(object sender, EventArgs e)
{
c2 = c2 + 1;
d2 = c2 % 10;
button2.Text = d2.ToString();
}

private void button3_Click(object sender, EventArgs e)
{
c3= c3+ 1;
d3 = c3 % 10;
button3.Text = d3.ToString();
}

private void timer2_Tick(object sender, EventArgs e)
{
c2 = c2 + 1;
d2= c2 % 10;
button2.Text = d2.ToString();
if (d2 == rndmoney2) timer2.Enabled = false;
}

private void timer3_Tick(object sender, EventArgs e)
{
c3 = c3 + 1;
d3 = c3 % 10;
button3.Text = d3.ToString();
if (d3 == rndmoney3) timer3.Enabled = false;
}
private void button4_Click(object sender, EventArgs e)
{

}

private void button4_Click_1(object sender, EventArgs e)
{

timer1.Enabled = true;
timer2.Enabled = true;
timer3.Enabled = true;

Random rnd = new Random();
rndmoney1 = rnd.Next(1, 9);
rndmoney2 = rnd.Next(1, 9);
rndmoney3 = rnd.Next(1, 9);
button4.Text = rndmoney1.ToString() + rndmoney2.ToString() + rndmoney3.ToString();
if (rndmoney1 == rndmoney2 && rndmoney2 == rndmoney3)
{
pictureBox2.Visible = true;
}



}

private void pictureBox2_Click(object sender, EventArgs e)
{


}

}
}拉霸  

arrow
arrow
    全站熱搜

    呆o傻 發表在 痞客邦 留言(0) 人氣()