Login Parol
namespace Login
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "Shohruxxon" && textBox2.Text == "999379312")
{
Form2 s = new Form2();
s.Show();
this.Hide();
}
else
{
textBox1.Text = "";
textBox2.Text = "";
MessageBox.Show("Login parol xato!");
}
}
}
}
GAME
namespace Уйин
{
public partial class Form1 : Form
{
int cash = 100;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void dvig1_Tick(object sender, EventArgs e)
{
Random rand = new Random();
int dig = rand.Next(9);
l1.Text = System.Convert.ToString(dig);
}
private void dvig2_Tick(object sender, EventArgs e)
{
Random rand = new Random();
int dig = rand.Next(9);
l2.Text = System.Convert.ToString(dig);
}
private void dvig3_Tick(object sender, EventArgs e)
{
Random rand = new Random();
int dig = rand.Next(9);
l3.Text = System.Convert.ToString(dig);
}
private void button1_Click(object sender, EventArgs e)
{
label2.Text = System.Convert.ToString(cash);
dvig1.Enabled = true;
dvig2.Enabled = true;
dvig3.Enabled = true;
stop1.Enabled = true;
stop2.Enabled = true;
stop3.Enabled = true;
}
private void stop1_Tick(object sender, EventArgs e)
{
dvig1.Enabled = false;
stop1.Enabled = false;
}
private void stop2_Tick(object sender, EventArgs e)
{
dvig2.Enabled = false;
stop2.Enabled = false;
}
private void stop3_Tick(object sender, EventArgs e)
{
dvig3.Enabled = false;
stop3.Enabled = false;
if ((l1.Text == "1") && (l2.Text == "1"))
{
if (l3.Text != "1")
{
MessageBox.Show("Siz $100 dollar yutingiz");
cash += 100;
}
}
if ((l1.Text == "2") && (l2.Text == "2"))
{
{
if (l3.Text != "2")
MessageBox.Show("Siz $200 dollar yutingiz");
cash += 200;
}
}
if ((l1.Text == "3") && (l2.Text == "3"))
{
{
if (l3.Text != "3")
MessageBox.Show("Siz $300 dollar yutingiz");
cash += 300;
}
}
if ((l1.Text == "4") && (l2.Text == "4"))
{
{
if (l3.Text != "4")
MessageBox.Show("Siz $400 dollar yutingiz");
cash += 400;
}
}
if ((l1.Text == "5") && (l2.Text == "5"))
{
{
if (l3.Text != "5")
MessageBox.Show("Siz $500 dollar yutingiz");
cash += 500;
}
}
if ((l1.Text == "6") && (l2.Text == "6"))
{
{
if (l3.Text != "6")
MessageBox.Show("Siz $600 dollar yutingiz");
cash += 600;
}
}
if ((l1.Text == "7") && (l2.Text == "7"))
{
{
if (l3.Text != "7")
MessageBox.Show("Siz $700 dollar yutingiz");
cash += 700;
}
}
if ((l1.Text == "1") && (l2.Text == "1") && (l3.Text == "1"))
{
MessageBox.Show("Siz $1000 dollar yutingiz");
}
if ((l1.Text == "2") && (l2.Text == "2") && (l3.Text == "2"))
{
MessageBox.Show("Siz $1500 dollar yutingiz");
}
if ((l1.Text == "3") && (l2.Text == "3") && (l3.Text == "3"))
{
MessageBox.Show("Siz $3000 dollar yutingiz");
}
if ((l1.Text == "4") && (l2.Text == "4") && (l3.Text == "4"))
{
MessageBox.Show("Siz $5000 dollar yutingiz");
}
if ((l1.Text == "5") && (l2.Text == "5") && (l3.Text == "5"))
{
MessageBox.Show("Siz $10000 dollar yutingiz");
}
if ((l1.Text == "6") && (l2.Text == "6") && (l3.Text == "6"))
{
MessageBox.Show("Siz $25000 dollar yutingiz");
}
if ((l1.Text == "7") && (l2.Text == "7") && (l3.Text == "7"))
{
MessageBox.Show("Siz $100000 dollar yutingiz");
}
if ((l1.Text == "7") || (l2.Text == "7") || (l3.Text == "7"))
{
MessageBox.Show("Siz $10 dollar yutingiz Uyini davom ettirish uchun Start tugmasini bosing");
cash += 10;
}
label2.Text = System.Convert.ToString(cash);
}
}
}
Do'stlaringiz bilan baham: |