c# oyunlar etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
c# oyunlar etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

21 Mart 2012 Çarşamba

4 İşlem Kullanarak Sayıya Ulaşmak


Formun Tamamı İçin Tıklayınız.



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

namespace WindowsFormsApplication48
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int a;
        int süre = 0;
        private void button13_Click(object sender, EventArgs e)
        {
            a = 0;
            süre = 0;
            textBox1.Text = "0";
            textBox2.Text = "0";
            timer1.Start();
            Random rd = new Random();
            int sayi1 = rd.Next(1, 20);
            int sayi2 = rd.Next(1, 20);
            int sayi3 = rd.Next(1, 20);
            int sayi4 = rd.Next(1, 20);
            int sayi5 = rd.Next(1, 20);
            int sayi6 = rd.Next(1, 20);
            int sayi7 = rd.Next(1, 20);
            int sayi8 = rd.Next(1, 20);
            int sayi9 = rd.Next(1, 20);
            int sayi10= rd.Next(1, 20);
            int sayi11 = rd.Next(1, 20);
            int sayi12 = rd.Next(1, 20);
            int hedef = rd.Next(50, 200);
            button1.Text = sayi1.ToString();
            button2.Text = sayi2.ToString();
            button3.Text = sayi3.ToString();
            button4.Text = sayi4.ToString();
            button5.Text = sayi5.ToString();
            button6.Text = sayi6.ToString();
            button7.Text = sayi7.ToString();
            button8.Text = sayi8.ToString();
            button9.Text = sayi9.ToString();
            button10.Text = sayi10.ToString();
            button11.Text = sayi11.ToString();
            button12.Text = sayi12.ToString();
            textBox1.Text = hedef.ToString();
            label3.Visible = true;
            button1.Enabled = true;
            button2.Enabled = true;
            button3.Enabled = true;
            button4.Enabled = true;
            button5.Enabled = true;
            button6.Enabled = true;
            button7.Enabled = true;
            button8.Enabled = true;
            button9.Enabled = true;
            button10.Enabled = true;
            button11.Enabled = true;
            button12.Enabled = true;
        }
        public void metod()
        {
            if (a == Convert.ToInt32(textBox1.Text))
            {
                MessageBox.Show("Bravoo");
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button1.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button1.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button1.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button1.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button1.Enabled = false;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button2.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button2.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button2.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button2.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button2.Enabled = false;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button3.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button3.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button3.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button3.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button3.Enabled = false;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button4.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button4.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button4.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button4.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button4.Enabled = false;
        }

        private void button5_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button5.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button5.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button5.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button5.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button5.Enabled = false;
        }

        private void button6_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button6.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button6.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button6.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button6.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button6.Enabled = false;
        }

        private void button7_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button7.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button7.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button7.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button7.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button7.Enabled = false;
        }

        private void button8_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button8.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button8.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button8.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button8.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button8.Enabled = false;
        }

        private void button9_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button9.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button9.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button9.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button9.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button9.Enabled = false;
        }

        private void button10_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button10.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button10.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button10.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button10.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button10.Enabled = false;
        }

        private void button11_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button11.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button11.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button11.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button11.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button11.Enabled = false;
        }

        private void button12_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button12.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                a = a - Convert.ToInt32(button12.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton3.Checked)
            {
                a = a * Convert.ToInt32(button12.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton4.Checked)
            {
                a = a / Convert.ToInt32(button12.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            button12.Enabled = false;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            label3.Text = süre.ToString();
            süre += 1;
            if (süre == 60)
            {
                timer1.Stop();
                panel1.Enabled = false;
                MessageBox.Show("süreniz doldu");
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            label3.Visible = false;
            label3.Text = "0";
        }
    }
}

19 Mart 2012 Pazartesi

Toplayarak ya da Çarparak Sayıya Ulaşmak


Formun Tamamı için Tıklayınız.





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

namespace WindowsFormsApplication47
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int a = 0;
        int c = 1;
        int b = 0;
        int d = 0;
        private void button1_Click(object sender, EventArgs e)
        {
            timer1.Start();
            if (radioButton1.Checked)
            {
                Random rd = new Random();
                int sayi = rd.Next(1, 10);
                int sayi1 = rd.Next(1, 10);
                int sayi2 = rd.Next(1, 10);
                int sayi3 = rd.Next(1, 10);
                int sayi4 = rd.Next(1, 10);
                int sayi5 = rd.Next(1, 10);
                int sayi6 = rd.Next(1, 10);
                int sayi7 = rd.Next(1, 10);
                int sayi8 = rd.Next(1, 10);
                int sayi9 = rd.Next(1, 10);
                int sayi14 = rd.Next(1, 10);
                int sayi10 = rd.Next(1, 10);
                int sayi11 = rd.Next(1, 10);
                int sayi12 = rd.Next(1, 10);
                int sayi13 = rd.Next(1, 10);
                int sayi15 = rd.Next(1, 10);
                int sayi16 = rd.Next(1, 10);
                int topla = rd.Next(50, 100);
                button2.Text = sayi.ToString();
                button3.Text = sayi1.ToString();
                button4.Text = sayi2.ToString();
                button5.Text = sayi3.ToString();
                button6.Text = sayi4.ToString();
                button7.Text = sayi5.ToString();
                button8.Text = sayi6.ToString();
                button9.Text = sayi7.ToString();
                button10.Text = sayi8.ToString();
                button11.Text = sayi9.ToString();
                button12.Text = sayi10.ToString();
                button13.Text = sayi13.ToString();
                button14.Text = sayi14.ToString();
                button15.Text = sayi15.ToString();
             
                textBox1.Text = topla.ToString();
            }
            if (radioButton2.Checked)
            {
                Random rd = new Random();
                int sayi = rd.Next(1, 10);
                int sayi1 = rd.Next(1, 10);
                int sayi2 = rd.Next(1, 10);
                int sayi3 = rd.Next(1, 10);
                int sayi4 = rd.Next(1, 10);
                int sayi5 = rd.Next(1, 10);
                int sayi6 = rd.Next(1, 10);
                int sayi7 = rd.Next(1, 10);
                int sayi8 = rd.Next(1, 10);
                int sayi9 = rd.Next(1, 10);
                int sayi14 = rd.Next(1, 10);
                int sayi10 = rd.Next(1, 10);
                int sayi11 = rd.Next(1, 10);
                int sayi12 = rd.Next(1, 10);
                int sayi13 = rd.Next(1, 10);
                int sayi15 = rd.Next(1, 10);
                int sayi16 = rd.Next(1, 10);
                int carp = rd.Next(100, 500);
                button2.Text = sayi.ToString();
                button3.Text = sayi1.ToString();
                button4.Text = sayi2.ToString();
                button5.Text = sayi3.ToString();
                button6.Text = sayi4.ToString();
                button7.Text = sayi5.ToString();
                button8.Text = sayi6.ToString();
                button9.Text = sayi7.ToString();
                button10.Text = sayi8.ToString();
                button11.Text = sayi9.ToString();
                button12.Text = sayi10.ToString();
                button13.Text = sayi13.ToString();
                button14.Text = sayi14.ToString();
                button15.Text = sayi15.ToString();
             
                textBox1.Text = carp.ToString();
            }
            button2.Enabled = true;
            button3.Enabled = true;
            button4.Enabled = true;
            button5.Enabled = true;
            button6.Enabled = true;
            button7.Enabled = true;
            button8.Enabled = true;
            button9.Enabled = true;
            button10.Enabled = true;
            button11.Enabled = true;
            button12.Enabled = true;
            button13.Enabled = true;
            button14.Enabled = true;
            button15.Enabled = true;
         
            a = 0;
            textBox2.Text = "0";
            d = 0;
            label3.Visible = true;
        }
        public void metod()
        {

            if (b == a)
            {
                MessageBox.Show("Bravo");
            }
        }
     


        private void button2_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button2.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button2.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button2.Enabled = false;      
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button3.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button3.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button3.Enabled = false;
        }

        private void button4_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button4.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button4.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button4.Enabled = false;
        }

        private void button5_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button5.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button5.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button5.Enabled = false;
        }

        private void button6_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button6.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c= c * Convert.ToInt32(button6.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button6.Enabled = false;
        }

        private void button7_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button7.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button7.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button7.Enabled = false;
        }

        private void button8_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button8.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button8.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button8.Enabled = false;
        }

        private void button9_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button9.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button9.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button9.Enabled = false;
        }

        private void button10_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button10.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button10.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button10.Enabled = false;
        }

        private void button11_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button11.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button11.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button11.Enabled = false;
        }  

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            b = Convert.ToInt32(textBox1.Text);
        }

        private void button12_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button12.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button12.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button12.Enabled = false;
        }

        private void button13_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button13.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button13.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button13.Enabled = false;
        }

        private void button14_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button14.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button14.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button14.Enabled = false;
        }

        private void button15_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                a = a + Convert.ToInt32(button15.Text);
                textBox2.Text = a.ToString();
                metod();
            }
            if (radioButton2.Checked)
            {
                c = c * Convert.ToInt32(button15.Text);
                textBox2.Text = c.ToString();
                metod();
            }
            button15.Enabled = false;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            d = d + 1;
            label3.Text = d.ToString();
            if (d == 15)
            {
                timer1.Stop();
                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;

                MessageBox.Show("Süreniz Bitti Yeniden Başlayın");

            }
            if (b == a)
            {
                timer1.Stop();
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            label3.Visible = false;
         
        }

    }
}


8 Mart 2012 Perşembe

C# Access Bağlantısı ve Soru Cevaplandırma-Değiştirme ve Timer


Formun Tamamı İçin Tıklayınız.


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

namespace WindowsFormsApplication59
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        ArrayList say = new ArrayList();
        OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=okul.mdb");
        int i = 0;
        int limit;
        int sure = 60;
        string[] cevaplar = new string[101];
        int g = 0;
        private void button1_Click(object sender, EventArgs e)
        {
            con.Open();
            OleDbDataAdapter da = new OleDbDataAdapter("select * from sinif", con);
            DataSet ds = new DataSet();
            da.Fill(ds, "pelin");      
            listBox1.Visible = true;
            listBox1.Items.Clear();
            int m=0;
            for (int j = 0; j < limit; j++)
            {
                if (ds.Tables[0].Rows[j][6].ToString() == cevaplar[j].ToString())
                {
                    listBox1.Items.Add(++m + ".soru DOĞRU");
                }
                else
                {
                    listBox1.Items.Add(++m + ".soru YANLIŞ");
                }
            }            
            con.Close();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            con.Open();
            OleDbDataAdapter da = new OleDbDataAdapter("select * from sinif", con);
            DataSet ds = new DataSet();
            da.Fill(ds, "pelin");
            label1.Text = ds.Tables[0].Rows[i][1].ToString();
            radioButton1.Text = ds.Tables[0].Rows[i][2].ToString();
            radioButton2.Text = ds.Tables[0].Rows[i][3].ToString();
            radioButton3.Text = ds.Tables[0].Rows[i][4].ToString();
            radioButton4.Text = ds.Tables[0].Rows[i][5].ToString();
            timer1.Start();                
            con.Close();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            sure -= 1;
            label2.Text = sure.ToString();
            if (sure == 0)
            {
                timer1.Stop();
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            i += 1;
            con.Open();
            OleDbDataAdapter da = new OleDbDataAdapter("select * from sinif", con);
            DataSet ds = new DataSet();
            da.Fill(ds, "pelin");
            limit = ds.Tables[0].Rows.Count;
            if (i >= limit)
            {
                MessageBox.Show("Sorular bitti kontrol et...");
                i = limit-1;
            }
            else
            {
                label1.Text = ds.Tables[0].Rows[i][1].ToString();
                radioButton1.Text = ds.Tables[0].Rows[i][2].ToString();
                radioButton2.Text = ds.Tables[0].Rows[i][3].ToString();
                radioButton3.Text = ds.Tables[0].Rows[i][4].ToString();
                radioButton4.Text = ds.Tables[0].Rows[i][5].ToString();
                g += 1;
            }        
            con.Close();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            i -= 1;
            con.Open();
            OleDbDataAdapter da = new OleDbDataAdapter("select * from sinif", con);
            DataSet ds = new DataSet();
            da.Fill(ds, "pelin");
            if (i <= -1)
            {
                MessageBox.Show("Zaten ilk sorudasın...   ??????");
                i = 0;
            }
            else
            {
                label1.Text = ds.Tables[0].Rows[i][1].ToString();
                radioButton1.Text = ds.Tables[0].Rows[i][2].ToString();
                radioButton2.Text = ds.Tables[0].Rows[i][3].ToString();
                radioButton3.Text = ds.Tables[0].Rows[i][4].ToString();
                radioButton4.Text = ds.Tables[0].Rows[i][5].ToString();
                g -= 1;
            }
            con.Close();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            if (radioButton1.Checked)
            {
                cevaplar[g] = "1";

            }
            if (radioButton2.Checked)
            {
                cevaplar[g] = "2";

            }
            if (radioButton3.Checked)
            {
                cevaplar[g] = "3";

            }
            if (radioButton4.Checked)
            {
                cevaplar[g] = "4";
            }
        }
    }
}