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

Ado. Net Depo Otomasyon 2 bölüm

 Merhaba

 Ado.Net Otomasyon Senaryomuzun 2 bölümü 




using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Data.SqlClient;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;


namespace DepoStokJoin

{

    public partial class Form2 : Form

    {

        public Form2()

        {

            InitializeComponent();

        }


        private void Form2_Load(object sender, EventArgs e)

        {

            TedarikciGetir();

            KategoriGetir();

        }

        SqlConnection cnn = new SqlConnection("Data Source=DESKTOP-F7P5CJL\\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True");

public void TedarikciGetir()
        {
            SqlCommand cmd = new SqlCommand("Select * from Tedarikciler", cnn);
            cnn.Open();
            SqlDataReader rdr = cmd.ExecuteReader();
            while (rdr.Read())
            {
                ComboMain cmb = new ComboMain();
                cmb.Text = rdr["SirketAdi"].ToString();
                cmb.Value = rdr["TedarikciID"];
                cmbTedarikci.Items.Add(cmb);
            }
            cnn.Close();


        }

        public void KategoriGetir()
        {
            SqlCommand cmd = new SqlCommand("Select * From Kategoriler", cnn);

           
            cnn.Open();
            SqlDataReader rdr = cmd.ExecuteReader();
            if (rdr.HasRows)
            {
                while (rdr.Read())
                {
                    ComboMain cmb = new ComboMain();
                    cmb.Text = rdr["KategoriAdi"].ToString();
                    cmb.Value = rdr["KategoriID"];
                    cmbKategori.Items.Add(cmb);
                }
            }
            cnn.Close();
        }


        public void UrunDetayGetir(string ID)
        {
            pnlDuzenle.Visible = true;
            pnlIptal.Visible = false;

            
            SqlCommand cmd = new SqlCommand("Select u.UrunID,u.UrunAdi,t.SirketAdi,k.KategoriAdi," +
                "u.BirimdekiMiktar,u.BirimFiyati,u.Sonlandi from Urunler as u inner join Kategoriler as k" +
                " on u.KategoriID=k.KategoriID join Tedarikciler as t on u.TedarikciID=t.TedarikciID where u.UrunID=@UID",cnn);
            cmd.Parameters.AddWithValue("@UID", ID);
            cnn.Open();
            SqlDataReader rdr = cmd.ExecuteReader();
            if (rdr.HasRows)
            {
                while (rdr.Read())
                {
                    //Panel 1 Doldurma
                    lblUrunID.Text= rdr["UrunID"].ToString();
                    lblUrunAdi.Text= rdr["UrunAdi"].ToString();
                    lblTedarikciAdi.Text= rdr["SirketAdi"].ToString();
                    lblKategoriAdi.Text= rdr["KategoriAdi"].ToString();
                    lblBirimMiktar.Text= rdr["BirimdekiMiktar"].ToString();
                    lblBirimFiyat.Text= rdr["BirimFiyati"].ToString();
                    lblSonlandi.Text= rdr["Sonlandi"].ToString();
                    //Panel2 doldurma Kısmı
                    lblUrunID2.Text = rdr["UrunID"].ToString();
                    txtUrunAdi.Text = rdr["UrunAdi"].ToString();
                    txtBirimFiyat.Text = rdr["BirimFiyati"].ToString();
                    txtBirimMiktar.Text = rdr["BirimdekiMiktar"].ToString();
                     chckSonlandi.Checked = Convert.ToBoolean(rdr["Sonlandi"].ToString());
                    cmbKategori.Text = rdr["KategoriAdi"].ToString();
                    cmbTedarikci.Text = rdr["SirketAdi"].ToString();

                }
            }
            else
            {
                MessageBox.Show("Data Okunamadı");
            }
            cnn.Close();

        }
   private void btnSil_Click(object sender, EventArgs e)
        {
           DialogResult sonuc= MessageBox.Show("Silmek İstediğinizden Emin misiniz?", "Onay", MessageBoxButtons.YesNo);
            if (sonuc==DialogResult.Yes)
            {
                SqlCommand cmd = new SqlCommand("Delete from Urunler where UrunID=@UID", cnn);
                cmd.Parameters.AddWithValue("@UID", lblUrunID.Text);

                cnn.Open();
                int etkilenensatirsayisi = cmd.ExecuteNonQuery();
                if (etkilenensatirsayisi > 0)
                {
                    MessageBox.Show("Veri Silindi");
                    Form1 frm = Application.OpenForms["Form1"] as Form1;
                    frm.UrunleriGetir();
                    
                }
                else
                {
                    MessageBox.Show("Veri Silinemedi");
                }

                cnn.Close();
            }
            else
            {
                this.Close();
            }
        }
 private void btnDuzenle_Click(object sender, EventArgs e)
        {
            pnlDuzenle.Visible = false;
            pnlIptal.Visible = true;
           
        }
  private void btnIptal_Click(object sender, EventArgs e)
        {
            pnlIptal.Visible = false;
            pnlDuzenle.Visible = true;
        }
 private void btnGuncelle_Click(object sender, EventArgs e)
        {
            SqlCommand cmd = new SqlCommand("Update Urunler set UrunAdi=@UrunAdi,TedarikciID=@TedID," +
                "KategoriID=@KatID,BirimdekiMiktar=@Miktar,BirimFiyati=@fiyat,Sonlandi=@Son where UrunID=@UID", cnn);
            cmd.Parameters.AddWithValue("UID", lblUrunID2.Text);
            cmd.Parameters.AddWithValue("@UrunAdi", txtUrunAdi.Text);

            ComboMain cmbted=   cmbTedarikci.SelectedItem as ComboMain;
            cmd.Parameters.AddWithValue("@TedID", cmbted.Value);

            ComboMain cmbkat = cmbKategori.SelectedItem as ComboMain;
            cmd.Parameters.AddWithValue("@KatID", cmbkat.Value);

            cmd.Parameters.AddWithValue("@Miktar", txtBirimMiktar.Text);

            SqlParameter prm = new SqlParameter("@Fiyat", SqlDbType.Money);
            prm.Value = txtBirimFiyat.Text;

            cmd.Parameters.Add(prm);

            cmd.Parameters.AddWithValue("@Son",chckSonlandi.Checked);
            cnn.Open();
            int etkilelenensatirsayisi=cmd.ExecuteNonQuery();

            if (etkilelenensatirsayisi > 0)
            {
                MessageBox.Show("Güncelleme İşlemi Gerçekleşti");
                Form1 frm = Application.OpenForms["Form1"] as Form1;
                frm.UrunleriGetir();
            }
            else
            {
                MessageBox.Show("Veri güncellemnemedi");
            }
            cnn.Close();


        }
    }
}

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;


namespace DepoStokJoin

{

    public class ComboMain

    {

        public string Text { get; set; }


        public object Value { get; set; }


        public override string ToString()

        {

            return Text;//Ekrana Comboboxdaki Şirket adi veya KategoriAdinı almak için yaptık

        }

    }

}


Erdem Yazılım Lisesi Öğrencileri için hazırlanmıştır 





Ado.Net Depo Otomasyon

 Merhaba Arkadaşlar ;


Bu bölümde bir senaryo ele alıp bu senaryoya göre Windows Application'ımız üzerinde ilerliyor olacağız.

Senaryo 

Senaryo ;

Öğrencilerimizden Selim ABC isimli yazılım firmasında işe başlamıştır. Selim'den istenen ülkeler arası taşımacılık yapan DEFG isimli firmanın deposuna gerekli yazılımı yapmasıdır.

Depo elamanı Mike 'ın depodaki ürünlerin listeni görebileceği bir ekran tasarlanması ve bu ekran üzerinde seçili ürüne tıklayıp detayını görmesi ,stok miktarı azalmış ise yada ürün isminde ,tedarikçisinde ,kategorisinde bir değişik olduğunda güncelleyebilmesi ve stoklarını takip edip gereken uyarıyı zamanından önce üst kademesine yada tedarikçi firmaya bildirebilmesidir.

Bu nedenle aşağıdaki formların tasarım ekranlarını yapmanız beklenmektedir. Daha sonra projemizin kod ekranlarını sınıf ortamında bir Database oluşturup yazıyor olacağız.


Ekran Tasarımlarımız 








form1 code behind 


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

namespace DepoStokJoin
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            UrunleriGetir();
        }

        public void UrunleriGetir()
        {
            lsvListe.Items.Clear();
            SqlConnection cnn = new SqlConnection("Data Source=DESKTOP-F7P5CJL\\SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True");

            SqlCommand cmd = new SqlCommand("Select u.UrunID,u.UrunAdi,k.KategoriAdi from Urunler as u join Kategoriler as k on u.KategoriID=k.KategoriID", cnn);

            cnn.Open();
            SqlDataReader rdr = cmd.ExecuteReader();
            if (rdr.HasRows)
            {
                while (rdr.Read())
                {
                    ListViewItem satir = new ListViewItem();
                    satir.Text = rdr["UrunID"].ToString();
                    satir.SubItems.Add(rdr["UrunAdi"].ToString());
                    satir.SubItems.Add(rdr["KategoriAdi"].ToString());

                    lsvListe.Items.Add(satir);
                }
            }
            else
            {
                MessageBox.Show("Herhangi Bir Data Okunamadı");
            }


            cnn.Close();
        }

        private void lsvListe_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            Form2 frm = Application.OpenForms["Form2"] as Form2;
            if (frm == null)
            {
                frm = new Form2();
            }
            frm.UrunDetayGetir(lsvListe.SelectedItems[0].Text);
            frm.Show();
        }
    }
}

Erdem Yazılım Lisesi Öğrencileri İçin Hazırlanmıştır







Basit Windows Uygulamaları

C # Sayı Bulmaca Oyunu




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 SinanArslanSayiBulmaca
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        Random rnd = new Random();    
        int sayi;
        int sayac = 0;
        int hak;
        private void Form1_Load(object sender, EventArgs e)
        {
            this.Opacity = 0;
            timer1.Interval = 10;
            timer1.Enabled = true;
            this.Height = 266;
            pictureBox1.Visible = false;
            sayi = rnd.Next(1, 50);    
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            this.Opacity = this.Opacity + 0.005;
            if (this.Opacity == 1)
            {
                timer1.Enabled = false;
            }
        }
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (KapatTamam == true)
            {
                e.Cancel = false;
            }
            else
            {
                e.Cancel = true;
 
                timer1.Enabled = false;
                timer2.Interval = 10;
                timer2.Enabled = true;
            }
        }
        bool KapatTamam = false;
        private void timer2_Tick(object sender, EventArgs e)
        {
            this.Opacity = this.Opacity - 0.005;
            if (this.Opacity == 0)
            {
                KapatTamam = true;
                this.Close();
            }
        }
        private void btnDene_Click(object sender, EventArgs e)
        {
            if (rbbaslangic.Checked == true)
            {
                hak = 10;
            }
            else if (rbOrta.Checked == true)
            {
                hak = 7;
            }
            else if (rbileri.Checked == true)
            {
                hak = 4;
            }
 
            sayac++;
            if (sayac < hak)
            {
                int tahmin = Convert.ToInt32(txttahmin.Text);       
                if (tahmin < sayi)                                
                {
                    label3.Text = "Tahmininz Küçük";
                }
 
                else if (tahmin > sayi)
                {
                    label3.Text = "Tahmininiz Büyük..";
                }
                else
                {
                    label3.Text = "Tebrikler Doğru Tahmin!!.." + sayac + ". tahminde buldunuz.";
                    pictureBox1.Visible = true;
                }
                txttahmin.Focus();  
                txttahmin.Select(0, 2);  
                this.Height = 450;
 
            }
            else
            {
                label3.Text = "Hakkınızı kaybettiniz";
                btnDene.Enabled = false;     
            }   
        }
 
        private void btnCikis_Click(object sender, EventArgs e)
        {
            this.Close();    
        }
 
        private void btnOyunSonu_Click(object sender, EventArgs e)
        {
            btnDene.Enabled = true;
            sayi = rnd.Next(1, 50);
            this.Height = 405;
            sayac = 0;
            txttahmin.Text = "";
            txttahmin.Focus();
            txttahmin.Select(0, 2);
            label3.Text = "";
            pictureBox1.Visible = false;
        }
 
       
 
       
    }
}


================================================== ====================
C # Harf Yakalama Oyunu













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 _23_HarfYakalamaca
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
            this.Width = 900;
            this.Height = 700;
            this.BackColor = Color.White;
            timer1.Interval = 2001;
            timer1.Enabled = true;
        }
        Random rnd = new Random();
        private void timer1_Tick(object sender, EventArgs e)
        {
            /*
             *  1. Kordinat için soldan ve yukardan mesafe
             *  2. Harf Goster
             */
            this.BackColor = Color.White;
 
            int Soldan = rnd.Next(0, this.Width - 50);
            int Yukardan = rnd.Next(0, this.Height - 50);
 
            label1.Left = Soldan;
            label1.Top = Yukardan;
 
            int AsciiKodu = rnd.Next(65, 91); //65
            char KarakterYap = Convert.ToChar(AsciiKodu); //65 'A'
            label1.Text = KarakterYap.ToString(); //"A"
        }
        int DogruSayisi = 0; int YanlisSayisi = 0;
        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            //eger (Klavyeden GElen == labeldan gelen)
            if (e.KeyChar.ToString() == label1.Text)
            {
                //AYNI
                this.BackColor = Color.Green;
                DogruSayisi++;
                if (timer1.Interval != 1)
                {
                    //timer1.Interval -= 250;
                    timer1.Interval = timer1.Interval - 250;
                }
            }
            else
            {
                //FARKLI
                YanlisSayisi++;
                this.BackColor = Color.Red;
            }
            this.Text = "Doğru Sayisi: " + DogruSayisi.ToString() + " - Yanlış Sayisi: " + YanlisSayisi.ToString() + " - Hız: " + timer1.Interval.ToString();
        }
    }
}
 
================================================== ======================

C # Slot Makinasi











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 _12_SlotMakinasi
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        Random rnd = new Random();
        int Sayac = 0;
        private void btnKendimiSansliHissediyorum_Click(object sender, EventArgs e)
        {
            Sayac = 0;
            timer1.Interval = 10;
            timer1.Enabled = true;
        }
 
        private void timer1_Tick(object sender, EventArgs e)
        {
            int Resim01 = rnd.Next(1, 6);
            int Resim02 = rnd.Next(1, 6);
            int Resim03 = rnd.Next(1, 6);
 
            #region Ilk Resim Secme Yeri
            if (Resim01 == 1)
            {
                pictureBox1.Image = Properties.Resources._001;
            }
            else if (Resim01 == 2)
            {
                pictureBox1.Image = Properties.Resources._002;
            }
            else if (Resim01 == 3)
            {
                pictureBox1.Image = Properties.Resources._003;
            }
            else if (Resim01 == 4)
            {
                pictureBox1.Image = Properties.Resources._004;
            }
            else if (Resim01 == 5)
            {
                pictureBox1.Image = Properties.Resources._005;
            }
            #endregion
            #region Ikinci Resim Secme Yeri
            if (Resim02 == 1)
            {
                pictureBox2.Image = Properties.Resources._001;
            }
            else if (Resim02 == 2)
            {
                pictureBox2.Image = Properties.Resources._002;
            }
            else if (Resim02 == 3)
            {
                pictureBox2.Image = Properties.Resources._003;
            }
            else if (Resim02 == 4)
            {
                pictureBox2.Image = Properties.Resources._004;
            }
            else if (Resim02 == 5)
            {
                pictureBox2.Image = Properties.Resources._005;
            }
            #endregion
            #region Üçüncü Resim Secme Yeri
            if (Resim03 == 1)
            {
                pictureBox3.Image = Properties.Resources._001;
            }
            else if (Resim03 == 2)
            {
                pictureBox3.Image = Properties.Resources._002;
            }
            else if (Resim03 == 3)
            {
                pictureBox3.Image = Properties.Resources._003;
            }
            else if (Resim03 == 4)
            {
                pictureBox3.Image = Properties.Resources._004;
            }
            else if (Resim03 == 5)
            {
                pictureBox3.Image = Properties.Resources._005;
            }
            #endregion
 
            Sayac++; //Sayac = Sayac + 1; //Sayac += 1;
            if (Sayac == 50)
            {
                timer1.Interval = 100;
            }
            else if (Sayac == 70)
            {
                timer1.Interval = 250;
            }
            else if (Sayac == 75)
            {
                timer1.Interval = 400;
            }
            else if (Sayac == 78)
            {
                timer1.Enabled = false;
                if (Resim01 == Resim02 && Resim01 == Resim03)
                {
                    MessageBox.Show("Kazandiniz");
                }
                else
                {
                    MessageBox.Show("Kaybettin");
                }
            }
        }
    }
}

================================================== ======================
C# At Yarışı Oyunu
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 _22_AtYarisi {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         private void btnBasla_Click(object sender, EventArgs e)         {             pbAt01.Left = 29;             pbAt02.Left = 29;             pbAt03.Left = 29;             timer1.Interval = 40;             timer1.Enabled = true;         }         Random rnd = new Random();         private void timer1_Tick(object sender, EventArgs e)         {             int at01Ilerleme = rnd.Next(1, 10);             int at02Ilerleme = rnd.Next(1, 10);             int at03Ilerleme = rnd.Next(1, 10);             pbAt01.Left += at01Ilerleme;             pbAt02.Left += at02Ilerleme;             pbAt03.Left += at03Ilerleme;             if (pbBitis.Left <= pbAt01.Right || pbBitis.Left <= pbAt02.Right || pbBitis.Left <= pbAt03.Right)             {                 timer1.Enabled = false;             }         }         private void button2_Click(object sender, EventArgs e)         {         }     } } ========================================================================
C# Şanslı Kişi Seçme Oyunu 



 











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 _20_SanliKisiSecici
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        string[] Isimler;
        private void button1_Click(object sender, EventArgs e)
        {
            Isimler = new string[8];
            Isimler[0] = "Ahmet";
            Isimler[1] = "Mehmet";
            Isimler[2] = "Kemal";
            Isimler[3] = "Haydar";
            Isimler[4] = "Nazan";
            Isimler[5] = "Baki";
            Isimler[6] = "Ali";
            Isimler[7] = "Aslı";
            Sayac = 0;
            label1.ForeColor = Color.Black;
            timer1.Interval = 1;
            timer1.Enabled = true;
        }
        Random rnd = new Random();
        int Sayac = 0;
        private void timer1_Tick(object sender, EventArgs e)
        {
            int RastgeleSayi = rnd.Next(0, Isimler.Length);
            string RastgeleIsim = Isimler[RastgeleSayi];
            label1.Text = RastgeleIsim;
 
            RastgeleSayi = rnd.Next(0, Isimler.Length);
            RastgeleIsim = Isimler[RastgeleSayi];
            label2.Text = RastgeleIsim;
 
            Sayac++;
            switch (Sayac)
            {
                case 50: timer1.Interval = 50; break;
                case 60: timer1.Interval = 100; break;
                case 70: timer1.Interval = 130; break;
                case 80: timer1.Interval = 200; break;
                case 90: timer1.Interval = 350; break;
                case 100: timer1.Interval = 550; break;
                case 103: timer1.Interval = 700; break;
                case 105: timer1.Interval = 1100; break;
                case 113: timer1.Enabled = false;
                    label1.ForeColor = Color.Red;
                    if (label1.Text == label2.Text)
                    {
                        while (true)
                        {
                            RastgeleSayi = rnd.Next(0, Isimler.Length);
                            RastgeleIsim = Isimler[RastgeleSayi];
                            label2.Text = RastgeleIsim;
                            if (label1.Text != label2.Text)
                            {
                                break;
                            }
                        }
                    }
                    break;
            }
        }
    }
}
 ====================================================================
C# Sayısal Loto Oyunu




 







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 _19_SayisalLoto2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int[] Sayilar;
        int Sayac = 0;
        Random rnd = new Random();
        private void btnCekilisYap_Click(object sender, EventArgs e)
        {
            Sayilar = new int[6];
 
            int KucukSayac = 0;
            while (KucukSayac < 6)
            {
                int RastgeleSayi = rnd.Next(1, 50); //1..49
                bool Varmi = Sayilar.Contains(RastgeleSayi);
                if (Varmi == false)
                {
                    Sayilar[KucukSayac] = RastgeleSayi;
                    KucukSayac++;
                }
            }
            //Array.Sort(Sayilar);
            timer1.Interval = 1;
            timer1.Enabled = true;
        }
 
        private void timer1_Tick(object sender, EventArgs e)
        {
            int Sayi01 = rnd.Next(1, 50); int Sayi02 = rnd.Next(1, 50);
            int Sayi03 = rnd.Next(1, 50); int Sayi04 = rnd.Next(1, 50);
            int Sayi05 = rnd.Next(1, 50); int Sayi06 = rnd.Next(1, 50);
 
            Sayac++;
            if (Sayac > 99 && Sayac < 120)
            {
                lblSayi01.Text = Sayilar[0].ToString();
                lblSayi02.Text = Sayi02.ToString();
                lblSayi03.Text = Sayi03.ToString();
                lblSayi04.Text = Sayi04.ToString();
                lblSayi05.Text = Sayi05.ToString();
                lblSayi06.Text = Sayi06.ToString();
                timer1.Interval = 100;
            }
            else if (Sayac > 119 && Sayac < 130)
            {
                lblSayi02.Text = Sayilar[1].ToString();
                lblSayi03.Text = Sayi03.ToString();
                lblSayi04.Text = Sayi04.ToString();
                lblSayi05.Text = Sayi05.ToString();
                lblSayi06.Text = Sayi06.ToString();
                timer1.Interval = 200;
            }
            else if (Sayac > 129 && Sayac < 140)
            {
                lblSayi03.Text = Sayilar[2].ToString();
                lblSayi04.Text = Sayi04.ToString();
                lblSayi05.Text = Sayi05.ToString();
                lblSayi06.Text = Sayi06.ToString();
                timer1.Interval = 250;
            }
            else if (Sayac > 139 && Sayac < 150)
            {
                lblSayi04.Text = Sayilar[3].ToString();
                lblSayi05.Text = Sayi05.ToString();
                lblSayi06.Text = Sayi06.ToString();
                timer1.Interval = 300;
            }
            else if (Sayac > 149 && Sayac < 160)
            {
                lblSayi05.Text = Sayilar[4].ToString();
                lblSayi06.Text = Sayi06.ToString();
                timer1.Interval = 400;
            }
            else if (Sayac == 160)
            {
                lblSayi06.Text = Sayilar[5].ToString();
                timer1.Interval = 1;
                timer1.Enabled = false;
                Sayac = 0;
            }
            else
            {
                lblSayi01.Text = Sayi01.ToString();
                lblSayi02.Text = Sayi02.ToString();
                lblSayi03.Text = Sayi03.ToString();
                lblSayi04.Text = Sayi04.ToString();
                lblSayi05.Text = Sayi05.ToString();
                lblSayi06.Text = Sayi06.ToString();
 
            }
 
        }
    }
}
 

Video Market Otomasyonu