private void button_Cikis_Click(object sender, EventArgs e) { Form_Giris form_Giris = new Form_Giris(); form_Giris.Show(); this.Hide(); }
private void btn_Cevapla_Click(object sender, EventArgs e) { if (textbox_Cevap.Text == Class_Phishing_Sorular.Sorular[0].Cevap) { Puan += 15 - Alinan_Harf; Class_Phishing_Sorular.SoruGec(); if (Class_Phishing_Sorular.Sorular.Count == 0) { DialogResult dialogResult = MessageBox.Show("Tebrikler Bitirdiniz \nPuanınız: " + Puan, "TEBRİKLER", MessageBoxButtons.RetryCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.Cancel) { Form_Giris form_Giris = new Form_Giris(); form_Giris.Show(); this.Hide(); } else if (dialogResult == DialogResult.Retry) { Form_Phishing form_Phishing = new Form_Phishing(); form_Phishing.Show(); this.Hide(); } } else { textbox_Soru.Text = Class_Phishing_Sorular.Sorular[0].Soru; Alinan_Harf = 0; textbox_Cevap.Text = ""; } } else { MessageBox.Show("Yanlış cevap", ":(", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void button_Test_Click(object sender, EventArgs e) { if (textBox_Boy.Text == "" || textBox_Isim.Text == "" || textBox_Kilo.Text == "" || textBox_Yas.Text == "" || comboBox_Meslek.Text == "" || comboBox_Milliyet.Text == "") { MessageBox.Show("Tüm Alanların Dolu Olduğundan Emin Olun", "Eksik Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { Class_Titanic_Puanla class_Titanic_Puanla = new Class_Titanic_Puanla(Convert.ToInt32(textBox_Yas.Text), comboBox_Milliyet.Text, comboBox_Meslek.Text, Convert.ToInt32(textBox_Boy.Text), Convert.ToInt32(textBox_Kilo.Text)); DialogResult dialogResult; if (class_Titanic_Puanla.GetPuan() >= 100) { dialogResult = MessageBox.Show("BRAVO " + textBox_Isim.Text + " \nSen tam bir hayatta kalansın. Titanik faciasından burnun bile kanamadan çıkarsın.", "HAYATTA KALDIN", MessageBoxButtons.RetryCancel); } else if (class_Titanic_Puanla.GetPuan() >= 50) { dialogResult = MessageBox.Show("Tam olarak hayatta kalabileceğini söyliyemeyiz. Ama imkansız da değil. Kendine güvenirsen başarabilirsin", "TEHLİKELİ", MessageBoxButtons.RetryCancel); } else if (class_Titanic_Puanla.GetPuan() >= 0) { dialogResult = MessageBox.Show("Hayatta kalabilirsin belki ama çok fazla şey feda etmen gerek", "ÇOK TEHLİKELİ", MessageBoxButtons.RetryCancel); } else { dialogResult = MessageBox.Show("Maalesef " + textBox_Isim.Text + " \nİyi ki o gemide değilsin çünkü sonu senin için hiçte iyi bitmezmiş", "HAYATTA KALAMADIN", MessageBoxButtons.RetryCancel); } if (dialogResult == DialogResult.Retry) { Form_Titanic form_Titanic = new Form_Titanic(); form_Titanic.Show(); this.Hide(); } else if (dialogResult == DialogResult.Cancel) { Form_Giris form_Giris = new Form_Giris(); form_Giris.Show(); this.Hide(); } } }
private void Sor() { try { if (comboBox_Cevaplar.Items.Count != 0) { class_Sorting_Sorular.Cevapla(Cevaplar[comboBox_Cevaplar.SelectedIndex]); } comboBox_Cevaplar.Items.Clear(); Cevaplar.Clear(); richTextBox_Soru.Text = Sorular[0].Soru; comboBox_Cevaplar.Items.Add(Sorular[0].Cevap1[0]); Cevaplar.Add(Sorular[0].Cevap1[1]); comboBox_Cevaplar.Items.Add(Sorular[0].Cevap2[0]); Cevaplar.Add(Sorular[0].Cevap2[1]); comboBox_Cevaplar.Items.Add(Sorular[0].Cevap3[0]); Cevaplar.Add(Sorular[0].Cevap3[1]); comboBox_Cevaplar.Items.Add(Sorular[0].Cevap4[0]); Cevaplar.Add(Sorular[0].Cevap4[1]); Sorular.RemoveAt(0); comboBox_Cevaplar.Text = ""; } catch { DialogResult dialogResult = MessageBox.Show(class_Sorting_Sorular.Bitir(textBox_Ad.Text), "Bitti", MessageBoxButtons.RetryCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.Retry) { Form_Sorting form_Sorting = new Form_Sorting(); form_Sorting.Show(); this.Hide(); } else { Form_Giris form_Giris = new Form_Giris(); form_Giris.Show(); this.Hide(); } } }
private void button_Planla_Click(object sender, EventArgs e) { if (textBox_Isim.Text == "" || comboBox_Dil.Text == "" || comboBox_Lokasyon.Text == "" || comboBox_Mevsim.Text == "" || comboBox_Tur.Text == "") { MessageBox.Show("Lütfen tüm alanların dolu olduğundan emin olun", "Eksik Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { Class_Tourist_YerAyarlama class_Tourist_YerAyarlama = new Class_Tourist_YerAyarlama(comboBox_Mevsim.Text, comboBox_Lokasyon.Text, comboBox_Dil.Text, comboBox_Tur.Text); DialogResult dialogResult = MessageBox.Show("Sevgili " + textBox_Isim.Text + " Senin için en uygun seyehat şehri " + class_Tourist_YerAyarlama.SehirSec() + "\nBu şehir tam senin aradığın şehir", "İyi Tatiller", MessageBoxButtons.RetryCancel, MessageBoxIcon.Information); if (dialogResult == DialogResult.Retry) { Form_Tourist form_Tourist = new Form_Tourist(); form_Tourist.Show(); this.Hide(); } else if (dialogResult == DialogResult.Cancel) { Form_Giris form_Giris = new Form_Giris(); form_Giris.Show(); this.Hide(); } } }