myusufaya
 
  WELCOME
  C# Değişkenler [ video linkli ]
  contextMenuStrip Kullanımı[C#]
  Dosya(File) İşlemleri Örneği[C#]
  C# 'da yapılmış alarm programı
  C#’ta Yapıcı Metotlar(Constructors)
  CheckedListBox Kullanımı[C#]
  C # Döngüler [ video linkli ]
  Form Üzerinde Nesneleri Sürükle-Bırak[C#]
  Ekran koruyucu yapımı [ C# ]
  C# 'da paint kullanımı
  ASP.Net ile PDF Dosya Oluşturmak
  ASP.net Nitelik(Attribute) Bazlı Veri Doğrulama(Validation)
  Asp.Net PopupMessageBox
  ASP.Net ve Validation Kontrolleri
  Basit bir form yapmak
  ASP.NET Custom Control Gelistirme - Rollover Image Link
  faydalı bilgiler
  ASP.NET MVC2 - Model Bağlayıcılar ve Değer Sağlayıcılarnın başlığı
  İletişim
CheckedListBox Kullanımı[C#]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            if (checkedListBox1.Items.Count == 0)
            {
                button1.Enabled = false;
                button3.Enabled = false;
            }
        }

        int i=0;

        private void button2_Click(object sender, EventArgs e)
        {
            i++;
            checkedListBox1.Items.Add(i.ToString());

            if (checkedListBox1.Items.Count > 0)
            {
                button1.Enabled = true;
                button1.Text = "Select All";

            }
        }

        int selectedIndex;

        private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            selectedIndex = checkedListBox1.SelectedIndex;
            button3.Enabled = true;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            i = checkedListBox1.Items.Count-1;

            do
            {
                if (checkedListBox1.GetItemChecked(i))
                    checkedListBox1.Items.RemoveAt(i);

                i--;
            } while (i >= 0);



         
        }

        private void button1_Click(object sender, EventArgs e)
        {
            bool state = false;

            if (button1.Text.Equals("Select All"))
            {
                state = true;
                button1.Text = "Unselect All";
            }
            else if (button1.Text.Equals("Unselect All"))
            {
                state = false;
                button1.Text = "Select All";
            }
           
            for (int i = 0; i < checkedListBox1.Items.Count; i++)
                {
                    checkedListBox1.SetItemChecked(i, state);
                   
                }

           
        }
    }
}
 
 
   
Bugün 20 ziyaretçi (29 klik) kişi burdaydı!
Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol