//--------------------BUTONLARDA KULLANICI GİRİŞİ SORGUSU-------------------------- private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "a" && textBox2.Text == "a") { Okul_Tanıımı o = new Okul_Tanıımı(); this.Hide(); o.Show(); } else if (textBox1.Text != "a" || textBox2.Text != "a") { timer1.Enabled = true; b++; label4.ForeColor = Color.Red; label4.Text = "Hatalı Giriş= " + b; if (b == 3) { MessageBox.Show("3 KERE HATALI GİRİŞ YAPTINIZ,LÜTFEN 5 SANİYE BEKLEYİNİZ!!!"); } timer2.Enabled = true; if (b == 5) { MessageBox.Show("5 KERE HATALI GİRİŞ YAPTINIZ,LÜTFEN 5 SANİYE BEKLEYİNİZ!!!"); } if (b == 7) { MessageBox.Show("7 KERE HATALI GİRİŞ YAPTINIZ,DAHA GİRİŞ YAPAMAZSINIZ"); button1.Enabled = false; } textBox1.Clear(); textBox2.Clear(); } }
private void button5_Click(object sender, EventArgs e) { Okul_Tanıımı ok = new Okul_Tanıımı(); this.Hide(); ok.Show(); }