System.Windows.Forms.CheckedListBox.GetItemChecked C# (CSharp) Method

GetItemChecked() public method

public GetItemChecked ( int index ) : bool
index int
return bool
		public bool GetItemChecked (int index)
		{
			return check_states.Contains (Items [index]);
		}
		

Usage Example

Example #1
0
 private bool kiemtra()
 {
     if (ma.Text == "")
     {
         ma.Focus();
         return(false);
     }
     if (ten.Text == "")
     {
         ten.Focus();
         return(false);
     }
     if (computer.SelectedIndex == -1)
     {
         computer.Focus();
         return(false);
     }
     s_nhomkho = "";
     for (int i = 0; i < nhomkho.Items.Count; i++)
     {
         if (nhomkho.GetItemChecked(i))
         {
             s_nhomkho += dtnhom.Rows[i]["id"].ToString().Trim() + ",";
         }
     }
     s_makho = "";
     for (int i = 0; i < makho.Items.Count; i++)
     {
         if (makho.GetItemChecked(i))
         {
             s_makho += dtkho.Rows[i]["id"].ToString().Trim() + ",";
         }
     }
     return(true);
 }
All Usage Examples Of System.Windows.Forms.CheckedListBox::GetItemChecked