C# Büyük Risk

C#.NET Büyük Risk

Ana Menü

        private void button1_Click(object sender, EventArgs e)
        {
            Form3 ac=new Form3();
            ac.Show();
            
        }
        private void button2_Click(object sender, EventArgs e)
        {
            Form2 ac = new Form2();
            ac.Show();
        }
        int ğ = 0;
        private void timer1_Tick(object sender, EventArgs e)
        {   
            ğ = ğ + 1;
            switch (ğ)
            {
                case 1: label1.ForeColor = Color.Red; break;
                case 2: label2.ForeColor = Color.Red; break;
                case 3: label3.ForeColor = Color.Red; break;
                case 4: label4.ForeColor = Color.Red; break;
                case 5: label5.ForeColor = Color.Red; break;
                case 6: label6.ForeColor = Color.Red; break;
                case 7: label7.ForeColor = Color.Red; break;
                case 8: label8.ForeColor = Color.Red; break;
                case 9: label9.ForeColor = Color.Red; break;      
                case 10: label1.ForeColor = Color.White; break;
                case 11: label2.ForeColor = Color.White; break;
                case 12: label3.ForeColor = Color.White; break;
                case 13: label4.ForeColor = Color.White; break;
                case 14: label5.ForeColor = Color.White; break;
                case 15: label6.ForeColor = Color.White; break;
                case 16: label7.ForeColor = Color.White; break;
                case 17: label8.ForeColor = Color.White; break;
                case 18: label9.ForeColor = Color.White; break;
                case 19: ğ = 0; break;
            }
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            SoundPlayer player = new SoundPlayer();
            string path = "ses003.wav"; 
          player.SoundLocation = path;
            player.Play();
            timer1.Start();
            timer2.Start();
        }
        int g = 0;
        private void timer2_Tick(object sender, EventArgs e)
        {
            g=g+1;
            switch (g)
            {
                case 1: label10.ForeColor = Color.Red; break;
                case 2: label11.ForeColor = Color.Red; break;
                case 3: label12.ForeColor = Color.Red; break;
                case 4: label13.ForeColor = Color.Red; break;
                case 5: label14.ForeColor = Color.Red; break;
                case 6: label15.ForeColor = Color.Red; break;
                case 7: label16.ForeColor = Color.Red; break;
                case 9: label23.ForeColor = Color.Red; break;
                case 10: label22.ForeColor = Color.Red; break;
                case 11: label21.ForeColor = Color.Red; break;
                case 12: label20.ForeColor = Color.Red; break;
                case 13: label19.ForeColor = Color.Red; break;
                case 14: label18.ForeColor = Color.Red; break;
                case 15: label17.ForeColor = Color.Red; break;
                case 16: label10.ForeColor = Color.White; break;
                case 17: label11.ForeColor = Color.White; break;
                case 18: label12.ForeColor = Color.White; break;
                case 19: label13.ForeColor = Color.White; break;
                case 20: label14.ForeColor = Color.White; break;
                case 21: label15.ForeColor = Color.White; break;
                case 22: label16.ForeColor = Color.White; break;
                case 23: label23.ForeColor = Color.White; break;
                case 24: label22.ForeColor = Color.White; break;
                case 25: label21.ForeColor = Color.White; break;
                case 26: label20.ForeColor = Color.White; break;
                case 27: label19.ForeColor = Color.White; break;
                case 28: label18.ForeColor = Color.White; break;
                case 29: label17.ForeColor = Color.White; break;
                case 30: g = 0; break;
            }
        }
    }
}


Oyun Bölümü

        string ktgr1 = "select * from Soru order by SoruNo";
        string ktgr2 = "select * from kategori2 order by SoruNo";
        string ktgr3 = "select * from kategori3 order by SoruNo";
        string a = "provider=microsoft.ace.oledb.12.0;Data Source=BüyükRisk.accdb";
        string k, cvp;
        void kat1()
        {
            string sorgu = "SELECT * FROM Soru";
            OleDbConnection baglan = new OleDbConnection(a);
            baglan.Open();
            OleDbCommand veri = new OleDbCommand(sorgu, baglan);
            OleDbDataReader oku;
            oku = veri.ExecuteReader();
            while (oku.Read())
            {
                if (x == oku[4].ToString())
                {
                    richTextBox1.Text = oku[1].ToString();
                    label7.Text = oku[4].ToString();
                    k = oku[6].ToString();
                    cvp = oku[2].ToString();
                }
            }
            oku.Close();
            baglan.Close();
        }
        void kat2()
        {

            OleDbConnection baglan = new OleDbConnection(a);
            baglan.Open();
            OleDbCommand veri = new OleDbCommand(ktgr2, baglan);
            OleDbDataReader oku;
            oku = veri.ExecuteReader();
            while (oku.Read())
            {

                if (y == oku[4].ToString())
                {
                    richTextBox1.Text = oku[1].ToString();
                    label7.Text = oku[4].ToString();
                    k = oku[6].ToString();
                    cvp = oku[2].ToString();
                }
            }
        }
        void kat3()
        {

            OleDbConnection baglan = new OleDbConnection(a);
            baglan.Open();
            OleDbCommand veri = new OleDbCommand(ktgr3, baglan);
            OleDbDataReader oku;
            oku = veri.ExecuteReader();
            while (oku.Read())
            {

                if (z == oku[4].ToString())
                {
                    richTextBox1.Text = oku[1].ToString();
                    label7.Text = oku[4].ToString();
                    k = oku[6].ToString();
                    cvp = oku[2].ToString();
                }
            }
        }
        void kategori1()
        {

            OleDbConnection baglan = new OleDbConnection(a);
            OleDbCommand yeni = new OleDbCommand(ktgr1, baglan);
            baglan.Open();
            OleDbDataReader data;
            data = yeni.ExecuteReader();
            int i = 1;
            while (data.Read())
            {
                if (data[5].ToString() == i.ToString())
                {
                    button16.Text = (data[0].ToString());
                }
            }
            data.Close();
            baglan.Close();
        }
        void kategori2()
        {

            OleDbConnection baglan = new OleDbConnection(a);
            OleDbCommand yeni = new OleDbCommand(ktgr2, baglan);
            baglan.Open();
            OleDbDataReader data;
            data = yeni.ExecuteReader();
            int i = 1;
            while (data.Read())
            {
                if (data[5].ToString() == i.ToString())
                {
                    button17.Text = (data[0].ToString());
                }
            }

            data.Close();
            baglan.Close();
        }
        void kategori3()
        {
            OleDbConnection baglan = new OleDbConnection(a);
            OleDbCommand yeni = new OleDbCommand(ktgr3, baglan);
            baglan.Open();
            OleDbDataReader data;
            data = yeni.ExecuteReader();
            int i = 1;
            while (data.Read())
            {
                if (data[5].ToString() == i.ToString())
                {
                    button18.Text = (data[0].ToString());
                }

            }
            data.Close();
            baglan.Close();
        }
        int sayi = 1000;
        private void Form3_Load(object sender, EventArgs e)
        {
            timer1.Start();
            timer2.Start();
            sayi = 300;
            label6.Text = sayi.ToString();
            kategori1();
            kategori2();
            kategori3();
            button1.Visible = false;
            button2.Visible = false;
            button3.Visible = false;
            button4.Visible = false;
            button5.Visible = false;
            button6.Visible = false;
            button7.Visible = false;
            button8.Visible = false;
            button9.Visible = false;
            button10.Visible = false;
            button11.Visible = false;
            button12.Visible = false;
            button13.Visible = false;
            button14.Visible = false;
            button15.Visible = false;
        }
        public static string x;
        public static string y;
        public static string z;
        int drm = 0;
        private void button1_Click(object sender, EventArgs e)
        {
            x = "100";
            kat1();
            drm = 1;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            x = "200";
            kat1();
            drm = 2;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            x = "300";
            kat1();
            drm = 3;
        }

        private void button5_Click(object sender, EventArgs e)
        {
            x = "500";
            kat1();
            drm = 5;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            x = "400";
            kat1();
            drm = 4;
        }

        private void button10_Click(object sender, EventArgs e)
        {
            y = "100";
            kat2();
            drm = 10;
        }

        private void button9_Click(object sender, EventArgs e)
        {
            y = "200";
            kat2();
            drm = 9;
        }

        private void button8_Click(object sender, EventArgs e)
        {
            y = "300";
            kat2();
            drm = 8;

        }

        private void button7_Click(object sender, EventArgs e)
        {
            y = "400";
            kat2();
            drm = 7;
        }

        private void button6_Click(object sender, EventArgs e)
        {
            y = "500";
            kat2();
            drm = 6;
        }

        private void button15_Click(object sender, EventArgs e)
        {
            z = "100";
            kat3();
            drm = 15;
        }

        private void button14_Click(object sender, EventArgs e)
        {
            z = "200";
            kat3();
            drm = 14;
        }

        private void button13_Click(object sender, EventArgs e)
        {
            z = "300";
            kat3();
            drm = 13;
        }

        private void button12_Click(object sender, EventArgs e)
        {
            z = "400";
            kat3();
            drm = 12;
        }

        private void button11_Click(object sender, EventArgs e)
        {
            z = "500";
            kat3();
            drm = 11;
        }

        private void button16_Click(object sender, EventArgs e)
        {
            button1.Visible = true;
            button2.Visible = true;
            button3.Visible = true;
            button4.Visible = true;
            button5.Visible = true;

        }

        private void button17_Click(object sender, EventArgs e)
        {
            button6.Visible = true;
            button7.Visible = true;
            button8.Visible = true;
            button9.Visible = true;
            button10.Visible = true;
        }

        private void button18_Click(object sender, EventArgs e)
        {
            button11.Visible = true;
            button12.Visible = true;
            button13.Visible = true;
            button14.Visible = true;
            button15.Visible = true;
        }
        int b, c, tpuan;
        private void button19_Click(object sender, EventArgs e)
        {
            string cevabım = textBox1.Text.ToLower();
            cvp = cvp.ToLower();
            if (cevabım == cvp)
            {
                if (drm == 1)
                {
                    button1.BackColor = Color.Green;
                    button1.Enabled = false;
                }
                if (drm == 2)
                {
                    button2.BackColor = Color.Green;
                    button2.Enabled = false;
                }
                if (drm == 3)
                {
                    button3.BackColor = Color.Green;
                    button3.Enabled = false;
                }
                if (drm == 4)
                {
                    button4.BackColor = Color.Green;
                    button4.Enabled = false;
                }
                if (drm == 5)
                {
                    button5.BackColor = Color.Green;
                    button5.Enabled = false;
                }
                if (drm == 6)
                {
                    button6.BackColor = Color.Green;
                    button6.Enabled = false;
                }
                if (drm == 7)
                {
                    button7.BackColor = Color.Green;
                    button7.Enabled = false;
                }
                if (drm == 8)
                {
                    button8.BackColor = Color.Green;
                    button8.Enabled = false;
                }
                if (drm == 9)
                {
                    button9.BackColor = Color.Green;
                    button9.Enabled = false;
                }
                if (drm == 10)
                {
                    button10.BackColor = Color.Green;
                    button10.Enabled = false;
                }
                if (drm == 11)
                {
                    button11.BackColor = Color.Green;
                    button11.Enabled = false;
                }
                if (drm == 12)
                {
                    button12.BackColor = Color.Green;
                    button12.Enabled = false;
                }
                if (drm == 13)
                {
                    button13.BackColor = Color.Green;
                    button13.Enabled = false;
                }
                if (drm == 14)
                {
                    button14.BackColor = Color.Green;
                    button14.Enabled = false;
                }
                if (drm == 15)
                {
                    button15.BackColor = Color.Green;
                    button15.Enabled = false;
                }
                b = int.Parse(label7.Text);
                c = int.Parse(label8.Text);
                tpuan = int.Parse(label8.Text);
                tpuan = b + c;
                label8.Text = tpuan.ToString();
              
                if (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 && button10.Enabled == false && button11.Enabled == false && button12.Enabled == false && button13.Enabled == false && button14.Enabled == false && button15.Enabled == false)
                {
                    timer1.Stop();
                    MessageBox.Show("Oyun bitti. Puanınız " + tpuan + " puandır");
                    this.Close();
                }
            }
            else
            {
                if (drm == 1)
                {
                    button1.BackColor = Color.Red;
                    button1.Enabled = false;
                }
                if (drm == 2)
                {
                    button2.BackColor = Color.Red;
                    button2.Enabled = false;
                }
                if (drm == 3)
                {
                    button3.BackColor = Color.Red;
                    button3.Enabled = false;
                }
                if (drm == 4)
                {
                    button4.BackColor = Color.Red;
                    button4.Enabled = false;
                }
                if (drm == 5)
                {
                    button5.BackColor = Color.Red;
                    button5.Enabled = false;
                }
                if (drm == 6)
                {
                    button6.BackColor = Color.Red;
                    button6.Enabled = false;
                }
                if (drm == 7)
                {
                    button7.BackColor = Color.Red;
                    button7.Enabled = false;
                }
                if (drm == 8)
                {
                    button8.BackColor = Color.Red;
                    button8.Enabled = false;
                }
                if (drm == 9)
                {
                    button9.BackColor = Color.Red;
                    button9.Enabled = false;
                }
                if (drm == 10)
                {
                    button10.BackColor = Color.Red;
                    button10.Enabled = false;
                }
                if (drm == 11)
                {
                    button11.BackColor = Color.Red;
                    button11.Enabled = false;
                }
                if (drm == 12)
                {
                    button12.BackColor = Color.Red;
                    button12.Enabled = false;
                }
                if (drm == 13)
                {
                    button13.BackColor = Color.Red;
                    button13.Enabled = false;
                }
                if (drm == 14)
                {
                    button14.BackColor = Color.Red;
                    button14.Enabled = false;
                }
                if (drm == 15)
                {
                    button15.BackColor = Color.Red;
                    button15.Enabled = false;
                }
                b = int.Parse(label7.Text);
                c = int.Parse(label8.Text);
                tpuan = int.Parse(label8.Text);
                tpuan = tpuan - b;
                label8.Text = tpuan.ToString();
          
                if (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 && button10.Enabled == false && button11.Enabled == false && button12.Enabled == false && button13.Enabled == false && button14.Enabled == false && button15.Enabled == false)
                {
                    timer1.Stop();
                    MessageBox.Show("Oyun bitti puanınız " + tpuan + " puandır");
                    this.Close();
                }
            }

            textBox1.Clear();
            richTextBox1.Clear();

        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            sayi--;
            label6.Text = sayi.ToString();
            if (sayi == 299)
            {
                label6.ForeColor = Color.Aqua;
            }
            if (sayi == 200)
            {
                label6.ForeColor = Color.Yellow;
            }
            if (sayi == 100)
            {
                label6.ForeColor = Color.Red;
            }
            if (sayi == 0)
            {
                timer1.Stop();
                MessageBox.Show("Süreniz bitti. Puanınız: " + tpuan + "puandır");
                this.Close();
            }

        }

        private void button20_Click(object sender, EventArgs e)
        {
            this.Close();
            Form1 ac = new Form1();
            ac.Show();

        }

        private void button21_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        int ğ= 0;
        private void timer2_Tick(object sender, EventArgs e)
        {
            ğ= ğ + 1;
            switch (ğ)
            {
                case 1: label9.ForeColor = Color.Red; break;
                case 2: label10.ForeColor = Color.Red; break;
                case 3: label11.ForeColor = Color.Red; break;
                case 4: label12.ForeColor = Color.Red; break;
                case 5: label13.ForeColor = Color.Red; break;
                case 6: label14.ForeColor = Color.Red; break;
                case 7: label15.ForeColor = Color.Red; break;
                case 8: label16.ForeColor = Color.Red; break;
                case 9: label17.ForeColor = Color.Red; break;
                case 10: label18.ForeColor = Color.Red; break;
                case 11: label19.ForeColor = Color.Red; break;
                case 12: label20.ForeColor = Color.Red; break;
                case 13: label21.ForeColor = Color.Red; break;
                case 14: label22.ForeColor = Color.Red; break;
                case 15: label23.ForeColor = Color.Red; break;
                case 16: label24.ForeColor = Color.Red; break;
                case 17: label25.ForeColor = Color.Red; break;
                case 18: label26.ForeColor = Color.Red; break;
                case 19: label27.ForeColor = Color.Red; break;
                case 20: label9.ForeColor = Color.White; break;
                case 21: label10.ForeColor = Color.White; break;
                case 22: label11.ForeColor = Color.White; break;
                case 23: label12.ForeColor = Color.White; break;
                case 24: label13.ForeColor = Color.White; break;
                case 25: label14.ForeColor = Color.White; break;
                case 26: label15.ForeColor = Color.White; break;
                case 27: label16.ForeColor = Color.White; break;
                case 28: label17.ForeColor = Color.White; break;
                case 29: label18.ForeColor = Color.White; break;
                case 30: label19.ForeColor = Color.White; break;
                case 31: label20.ForeColor = Color.White; break;
                case 32: label21.ForeColor = Color.White; break;
                case 33: label22.ForeColor = Color.White; break;
                case 34: label23.ForeColor = Color.White; break;
                case 35: label24.ForeColor = Color.White; break;
                case 36: label25.ForeColor = Color.White; break;
                case 37: label26.ForeColor = Color.White; break;
                case 38: label27.ForeColor = Color.White; break;
                case 39: ğ = 0; break;
            }
        }
    }
}


Ayar Bölümü

        string a = "provider=microsoft.ace.oledb.12.0;Data Source=BüyükRisk.accdb";
        void goster()
        {
            string sorgu = "select*from Soru";
            OleDbConnection baglan = new OleDbConnection(a);
            baglan.Open();
            OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
            DataSet goster = new DataSet();
            getir.Fill(goster, "Soru");
            dataGridView1.DataSource = goster.Tables["Soru"];
            getir.Dispose();
            baglan.Close();
        }
        void goster1()
        {
            string sorgu = "select*from kategori2";
            OleDbConnection baglan = new OleDbConnection(a);
            baglan.Open();
            OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
            DataSet goster = new DataSet();
            getir.Fill(goster, "kategori2");
            dataGridView2.DataSource = goster.Tables["kategori2"];
            getir.Dispose();
            baglan.Close();
        }
        void goster2()
        {
            string sorgu = "select*from kategori3";
            OleDbConnection baglan = new OleDbConnection(a);
            baglan.Open();
            OleDbDataAdapter getir = new OleDbDataAdapter(sorgu, baglan);
            DataSet goster = new DataSet();
            getir.Fill(goster, "kategori3");
            dataGridView3.DataSource = goster.Tables["kategori3"];
            getir.Dispose();
            baglan.Close();
        }
        private void Form2_Load(object sender, EventArgs e)
        {
            timer1.Start();
            timer2.Start();
            timer3.Start();
            timer4.Start();
            goster();
            goster1();
            goster2();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedIndex == 0 && comboBox2.SelectedIndex == 0)
            {
                OleDbConnection baglan = new OleDbConnection(a);
                baglan.Open();
                string b = "insert into Soru([Kategori],[Soru],[Cevap],[Puan],[Sıra],[K]) values('" + comboBox1.Text + "','" + richTextBox1.Text + "','" + textBox1.Text + "','" + textBox3.Text + "','" + textBox5.Text + "','" + comboBox2.Text + "')";
                OleDbCommand kaydet = new OleDbCommand(b, baglan);
                kaydet.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Kaydetme İşlemi Tamamlandı");
                goster();
            }
            else if (comboBox1.SelectedIndex == 1 && comboBox2.SelectedIndex == 1)
            {
                OleDbConnection baglan = new OleDbConnection(a);
                baglan.Open();
                string c = "insert into kategori2([Kategori],[Soru],[Cevap],[Puan],[Sıra],[K]) values('" + comboBox1.Text + "','" + richTextBox1.Text + "','" + textBox1.Text + "','" + textBox3.Text + "','" + textBox5.Text + "','" + comboBox2.Text + "')";
                OleDbCommand kaydet = new OleDbCommand(c, baglan);
                kaydet.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Kaydetme İşlemi Tamamlandı");
                goster1();
            }
            else if (comboBox1.SelectedIndex == 2 && comboBox2.SelectedIndex == 2)
            {
                OleDbConnection baglan = new OleDbConnection(a);
                baglan.Open();
                string d = "insert into kategori3([Kategori],[Soru],[Cevap],[Puan],[Sıra],[K]) values('" + comboBox1.Text + "','" + richTextBox1.Text + "','" + textBox1.Text + "','" + textBox3.Text + "','" + textBox5.Text + "','" + comboBox2.Text + "')";
                OleDbCommand kaydet = new OleDbCommand(d, baglan);
                kaydet.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Kaydetme İşlemi Tamamlandı");
                goster2();
            }
        }
        private void button3_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedIndex == 0 && comboBox2.SelectedIndex == 0)
            {
                OleDbConnection baglan = new OleDbConnection(a);
                baglan.Open();
                string guncelle1 = "Update Soru Set Kategori='" + comboBox1.Text + "', Soru='" + richTextBox1.Text + "', Cevap='" + textBox1.Text + "',Puan='" + textBox3.Text + "',Sıra='" + textBox5.Text + "',K='" + comboBox2.Text + "'   Where SoruNo=" + textBox4.Text + "";
                OleDbCommand update = new OleDbCommand(guncelle1, baglan);
                update.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Güncelleme İşlemi Tamamlandı");
                goster();
            }
            if (comboBox1.SelectedIndex == 1 && comboBox2.SelectedIndex == 1)
            {
                OleDbConnection baglan = new OleDbConnection(a);
                baglan.Open();
                string guncelle2 = "Update kategori2 Set Kategori='" + comboBox1.Text + "', Soru='" + richTextBox1.Text + "', Cevap='" + textBox1.Text + "',Puan='" + textBox3.Text + "',Sıra='" + textBox5.Text + "',K='" + comboBox2.Text + "'   Where SoruNo=" + textBox4.Text + "";
                OleDbCommand update = new OleDbCommand(guncelle2, baglan);
                update.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Güncelleme İşlemi Tamamlandı");
                goster1();
            }
            if (comboBox1.SelectedIndex == 2 && comboBox2.SelectedIndex == 2)
            {
                OleDbConnection baglan = new OleDbConnection(a);
                baglan.Open();
                string guncelle3 = "Update kategori3 Set Kategori='" + comboBox1.Text + "', Soru='" + richTextBox1.Text + "', Cevap='" + textBox1.Text + "',Puan='" + textBox3.Text + "',Sıra='" + textBox5.Text + "',K='" + comboBox2.Text + "'  Where SoruNo=" + textBox4.Text + "";
                OleDbCommand update = new OleDbCommand(guncelle3, baglan);
                update.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Güncelleme İşlemi Tamamlandı");
                goster2();
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            if (comboBox1.SelectedIndex == 0 && comboBox2.SelectedIndex==0)
            {
                OleDbConnection baglan = new OleDbConnection(a);
                baglan.Open();
                string sorgu = "delete from Soru where SoruNo=" + textBox2.Text + "";
                OleDbCommand uygula = new OleDbCommand(sorgu, baglan);
                uygula.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Silme İşlemi Tamamlandı");
                goster();
            }
            if (comboBox1.SelectedIndex == 1 && comboBox2.SelectedIndex == 1)
            {
                OleDbConnection baglan = new OleDbConnection(a);
                baglan.Open();
                string sorgu = "delete from kategori2 where SoruNo=" + textBox2.Text + "";
                OleDbCommand uygula = new OleDbCommand(sorgu, baglan);
                uygula.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Silme İşlemi Tamamlandı");
                goster1();
            }
            if (comboBox1.SelectedIndex == 2 && comboBox2.SelectedIndex == 2)
            {
                OleDbConnection baglan = new OleDbConnection(a);
                baglan.Open();
                string sorgu = "delete from kategori3 where SoruNo=" + textBox2.Text + "";
                OleDbCommand uygula = new OleDbCommand(sorgu, baglan);
                uygula.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Silme İşlemi Tamamlandı");
                goster2();
            }
        }
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int secili = dataGridView1.SelectedCells[0].RowIndex;
            comboBox1.Text = dataGridView1.Rows[secili].Cells[0].Value.ToString();
            richTextBox1.Text = dataGridView1.Rows[secili].Cells[1].Value.ToString();
            textBox3.Text = dataGridView1.Rows[secili].Cells[4].Value.ToString();
            textBox1.Text = dataGridView1.Rows[secili].Cells[2].Value.ToString();
            textBox4.Text = dataGridView1.Rows[secili].Cells[3].Value.ToString();
            textBox5.Text = dataGridView1.Rows[secili].Cells[5].Value.ToString();
            comboBox2.Text = dataGridView1.Rows[secili].Cells[6].Value.ToString();
        }
        private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int secili = dataGridView2.SelectedCells[0].RowIndex;
            comboBox1.Text = dataGridView2.Rows[secili].Cells[0].Value.ToString();
            richTextBox1.Text = dataGridView2.Rows[secili].Cells[1].Value.ToString();
            textBox3.Text = dataGridView2.Rows[secili].Cells[4].Value.ToString();
            textBox1.Text = dataGridView2.Rows[secili].Cells[2].Value.ToString();
            textBox4.Text = dataGridView2.Rows[secili].Cells[3].Value.ToString();
            textBox5.Text = dataGridView2.Rows[secili].Cells[5].Value.ToString();
            comboBox2.Text = dataGridView2.Rows[secili].Cells[6].Value.ToString();
        }

        private void dataGridView3_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int secili = dataGridView3.SelectedCells[0].RowIndex;
            comboBox1.Text = dataGridView3.Rows[secili].Cells[0].Value.ToString();
            richTextBox1.Text = dataGridView3.Rows[secili].Cells[1].Value.ToString();
            textBox3.Text = dataGridView3.Rows[secili].Cells[4].Value.ToString();
            textBox1.Text = dataGridView3.Rows[secili].Cells[2].Value.ToString();
            textBox4.Text = dataGridView3.Rows[secili].Cells[3].Value.ToString();
            textBox5.Text = dataGridView3.Rows[secili].Cells[5].Value.ToString();
            comboBox2.Text = dataGridView3.Rows[secili].Cells[6].Value.ToString();
        }
        private void button4_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        int ğ = 0;
        private void timer1_Tick(object sender, EventArgs e)
        {
            ğ = ğ + 1;
            switch (ğ)
            {
                case 1: label22.ForeColor = Color.Red; break;
                case 2: label9.ForeColor = Color.Red; break;
                case 3: label10.ForeColor = Color.Red; break;
                case 4: label11.ForeColor = Color.Red; break;
                case 5: label12.ForeColor = Color.Red; break;
                case 6: label13.ForeColor = Color.Red; break;
                case 7: label14.ForeColor = Color.Red; break;
                case 8: label15.ForeColor = Color.Red; break;
                case 9: label16.ForeColor = Color.Red; break;
                case 10: label17.ForeColor = Color.Red; break;
                case 11: label18.ForeColor = Color.Red; break;
                case 12: label19.ForeColor = Color.Red; break;
                case 13: label20.ForeColor = Color.Red; break;
                case 14: label21.ForeColor = Color.Red; break;
                case 15: label22.ForeColor = Color.White; break;
                case 16: label9.ForeColor = Color.White; break;
                case 17: label10.ForeColor = Color.White; break;
                case 18: label11.ForeColor = Color.White; break;
                case 20: label12.ForeColor = Color.White; break;
                case 21: label13.ForeColor = Color.White; break;
                case 22: label14.ForeColor = Color.White; break;
                case 23: label15.ForeColor = Color.White; break;
                case 24: label16.ForeColor = Color.White; break;
                case 25: label17.ForeColor = Color.White; break;
                case 26: label18.ForeColor = Color.White; break;
                case 27: label19.ForeColor = Color.White; break;
                case 28: label20.ForeColor = Color.White; break;
                case 29: label21.ForeColor = Color.White; break;
                case 30: ğ = 0; break;
            }


        }

        private void button5_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        int k=0;
        private void timer2_Tick(object sender, EventArgs e)
        {
            k = k + 1;
            switch (k)
            {
                case 1: label23.ForeColor = Color.Red; break;
                case 2: label24.ForeColor = Color.White; break;
                case 3: label25.ForeColor = Color.Red; break;
                case 4: label26.ForeColor = Color.White; break;
                case 5: label27.ForeColor = Color.Red; break;
                case 6: label28.ForeColor = Color.White; break;
                case 7: label29.ForeColor = Color.Red; break;
                case 8: label30.ForeColor = Color.White; break;
                case 9: label31.ForeColor = Color.Red; break;
                case 10: label32.ForeColor = Color.White; break;
                case 11: label33.ForeColor = Color.Red; break;
                case 12: label34.ForeColor = Color.White; break;
                case 13: label35.ForeColor = Color.Red; break;
                case 14: label36.ForeColor = Color.White; break;
                case 15: label37.ForeColor = Color.Red; break;
                case 16: label38.ForeColor = Color.White; break;
                case 17: label39.ForeColor = Color.Red; break;
                case 18: label40.ForeColor = Color.White; break;
                case 19: label23.ForeColor = Color.White; break;
                case 20: label24.ForeColor = Color.Red; break;
                case 21: label25.ForeColor = Color.White; break;
                case 22: label26.ForeColor = Color.Red; break;
                case 23: label27.ForeColor = Color.White; break;
                case 24: label28.ForeColor = Color.Red; break;
                case 25: label29.ForeColor = Color.White; break;
                case 26: label30.ForeColor = Color.Red; break;
                case 27: label31.ForeColor = Color.White; break;
                case 28: label32.ForeColor = Color.Red; break;
                case 29: label33.ForeColor = Color.White; break;
                case 30: label34.ForeColor = Color.Red; break;
                case 31: label35.ForeColor = Color.White; break;
                case 32: label36.ForeColor = Color.Red; break;
                case 33: label37.ForeColor = Color.White; break;
                case 34: label38.ForeColor = Color.Red; break;
                case 35: label39.ForeColor = Color.White; break;
                case 36: label40.ForeColor = Color.Red; break;
                case 37: k= 0; break;
            }
        }
        int p = 0;
        private void timer3_Tick(object sender, EventArgs e)
        {
            p = p + 1;
            switch (p)
            {
                case 1: pictureBox1.Show();
                    break;
                case 2: pictureBox2.Show();
                    break;
                case 3: pictureBox1.Hide();
                    break;
                case 4: pictureBox2.Hide();
                    break;
                case 5: p = 0;
                    break;
            }
        }
        int ı = 0;
        private void timer4_Tick(object sender, EventArgs e)
        {
            ı = ı + 1;
            switch (ı)
            {
                case 1: pictureBox3.Show();
                    break;
                case 2: pictureBox4.Show();
                    break;
                case 3: pictureBox3.Hide();
                    break;
                case 4: pictureBox4.Hide();
                    break;
                case 5: ı = 0;
                    break;
            }
        }
        int r = 0;
        private void pictureBox5_Click(object sender, EventArgs e)
        {

            if (r % 2 == 0)
            {

                timer1.Stop();
                timer2.Stop();
                timer3.Stop();
                timer4.Stop();
                pictureBox5.BackgroundImage = Image.FromFile("söndür.ico");
                r++;
            }
            else
            {
                timer1.Start();
                timer2.Start();
                timer3.Start();
                timer4.Start();
                pictureBox5.BackgroundImage = Image.FromFile("yak.ico");
                r++;
            }
        }

3.930 defa okundu.

2 Responses to C# Büyük Risk

  1. Atakan dedi ki:

    Selamın Aleyküm. Kardeşim şu programı upload eder misin veya e mailden bana yollayabilir misin? E-mail aderesim: atakan.bah@gmail.com

Bir Cevap Yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Powered by WordPress | Designed by: credit repair | Thanks to st louis web design, essay writing and fire glass
c# örnekleri , csharp örnekleri , c# örnek , C# Örnekleri , örnekleri c# , C# ÖRNEKLERİ
BTT Sınavları

C# Uygulamaları

Müdür Yardımcılığı Sınavına Hazırlık Sayfası

Müdür Yardımcılığı Çalışma Notları

C# Uygulamaları

Yazılı Soruları Php Dersleri Bilişim Teknolojileri Alanı Yazılı Soruları C# Dersleri C# Örnekleri