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

16 Mayıs 2012 Çarşamba

C# Random (Farklı Sayılar)

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


# CLASS İÇİ #

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.Collections;

namespace WindowsFormsApplication9
{
    class Class1
    {
        public int s = 0;
        public int c = 0;
      public ArrayList say = new ArrayList();
      public int i = 0;
        public int puan=0;
        public void rastgele(Form1 enes)
        {
           
            try
            {
                bool durum = true;
                int m = 0;
                while (durum)
                {
                    Random ras = new Random();
                    int a = ras.Next(1, 10);
                    int c = say.IndexOf(a);
                    if (c == -1)
                    {
                        say.Add(a);
                        m = say.Count;
                    }
                    if (m == 6)
                    {
                        durum = false;
                    }
                }
            }
            catch
            {
                MessageBox.Show("Kodlarda hata var");
            }
            enes.button1.Text = say[0].ToString();
            enes.button2.Text = say[1].ToString();
            enes.button3.Text = say[2].ToString();
            enes.button4.Text = say[3].ToString();
            enes.button5.Text = say[4].ToString();
            enes.button6.Text = say[5].ToString();
        }

        public void ikiz(Form1 bekir)
        {
            try
            {
                if (s == 2)
                {
                    MessageBox.Show("Başka seçilemez...");
                    s = 0;
                }
                else
                {
                    s += 1;
                }

            }
            catch
            {
                MessageBox.Show("Kodlarda hata var");
            }
        }
        public void topla(Form1 berk)
        {
            c = c + Convert.ToInt32(say[i].ToString());      
        }
        public void sonuc(Form1 mehtap)
        {
            if (c.ToString() == mehtap.textBox1.Text)
            {
                puan += 10;

                mehtap.label3.Text = puan.ToString();
            }
            else
            {
                puan -= 5;

                mehtap.label3.Text = puan.ToString();
            }

        }
    }
}



# BUTON İÇİ #

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 WindowsFormsApplication9
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        Class1 selim = new Class1();
        private void Form1_Load(object sender, EventArgs e)
        {

            selim.rastgele(this);

        }

        private void tabPage2_Click(object sender, EventArgs e)
        {
            selim.rastgele(this);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            selim.ikiz(this);

            if (selim.s != 0)
            {
                button1.Enabled = false;
                selim.i = 0;
                selim.topla(this);


            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            selim.ikiz(this);

            if (selim.s != 0)
            {
                button2.Enabled = false;
                selim.i = 1;
                selim.topla(this);
            }
        }

        private void button4_Click(object sender, EventArgs e)
        {
            selim.ikiz(this);

            if (selim.s != 0)
            {
                button4.Enabled = false;
                selim.i = 3;
                selim.topla(this);
            }
        }

        private void button5_Click(object sender, EventArgs e)
        {
            selim.ikiz(this);

            if (selim.s != 0)
            {
                button5.Enabled = false;
                selim.i = 4;
                selim.topla(this);
            }
        }

        private void button6_Click(object sender, EventArgs e)
        {
            selim.ikiz(this);

            if (selim.s != 0)
            {
                button6.Enabled = false;
                selim.i = 5;
                selim.topla(this);
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            selim.ikiz(this);

            if (selim.s != 0)
            {
                button3.Enabled = false;
                selim.i = 2;
                selim.topla(this);
            }
        }

        private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {

            selim.sonuc(this);

        }
    }
}


27 Mart 2012 Salı

C# Sayı Bulmak


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

EMİR ÖZBEY



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 WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        string ad;
        int p = 0;
        int h = 20;
        double m, q, w, f, ı, g, d,o;
        double sonuc = 0;
     
        int v=0;
        void mesaj()
        {
            if (sonuc == Convert.ToInt32(textBox3.Text))
            {
                p = p + 10;
                label3.Text = p.ToString();
                listBox1.Items.Add(++v + ")" + sonuc + " " + "Doğru" + " " + textBox3.Text + " " + "Doğru");
            }
            else
            {
                p = p - 10;
                label3.Text = p.ToString();
                listBox1.Items.Add(++v + ")" + sonuc + " " + "Doğru" + " " + textBox3.Text + " " + "Yanlış");
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            m = Convert.ToInt32(textBox1.Text);
            q = Convert.ToInt32(textBox2.Text);
            sonuc = m + q;
            mesaj();
            listBox1.BackColor = Color.Red;    
        }

        private void button5_Click(object sender, EventArgs e)
        {
            Random a=new Random();
            int k = a.Next(1, 25);
            int k1 = a.Next(1, 25);
            textBox1.Text=k.ToString();
            textBox2.Text = k1.ToString();      
        }

        private void button2_Click(object sender, EventArgs e)
        {          
            w = Convert.ToInt32(textBox1.Text);
            f = Convert.ToInt32(textBox2.Text);
            sonuc = w - f;
            mesaj();
            listBox1.BackColor = Color.Yellow;        
        }

        private void button3_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            ı = Convert.ToInt32(textBox1.Text);
            o = Convert.ToInt32(textBox2.Text);
            sonuc =(ı / o);
            mesaj();
            listBox1.BackColor = Color.Blue;        
        }

        private void button4_Click(object sender, EventArgs e)
        {        
            g = Convert.ToInt32(textBox1.Text);
            d = Convert.ToInt32(textBox2.Text);
            sonuc = g * d;
            mesaj();
            listBox1.BackColor = Color.Green;          
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            h = h - 1;
            label2.Visible = true;
            label2.Text = h.ToString();
            if(h==0)
            {
                panel1.Visible = false;
                label1.Enabled = false;
                label2.Enabled = false;
                label3.Enabled = false;
                listBox1.Enabled = false;
                button1.Enabled = false;
                button2.Enabled = false;
                button3.Enabled = false;
                button4.Enabled = false;
                textBox1.Enabled= false;
                textBox2.Enabled = false;
                textBox3.Enabled = false;
                listBox1.Items.Add(ad+" "+"Puanınız"+" "+p);
                listBox2.Items.Add(ad + " " + "Puanınız" + " " + p);
                timer1.Stop();
                label2.Visible = false;
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {          
            label3.Text = p.ToString();        
        }

        private void button6_Click(object sender, EventArgs e)
        {
            label1.Enabled = false;
            label2.Enabled = false;
            label3.Enabled = false;
            listBox1.Enabled = false;
            button1.Enabled = false;
            button2.Enabled = false;
            button3.Enabled = false;
            button4.Enabled = false;
            textBox1.Enabled = false;
            textBox2.Enabled = false;
            textBox3.Enabled = false;
            textBox3.Clear();
            textBox4.Clear();
            p = 0;
            listBox1.Items.Clear();
            h = 20;
            timer1.Start();
            ad = textBox4.Text;
            panel1.Visible = true;
        }

        private void button7_Click(object sender, EventArgs e)
        {
            listBox1.Visible = true;
        }
    }
}

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";
        }
    }
}

20 Mart 2012 Salı

Visual Studio 2010 Projesini VS 2008 ' de Açmak



Visual Studio 2008 kullananlar için Visual Studio 2010 projesini normal yollardan açamayız. Aşağıdaki yöntemleri yaptıktan sonra 2008 projesiymiş gibi kullanabiliriz.






































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;
         
        }

    }
}