System.Windows.Forms.CheckedListBox.ObjectCollection.Add C# (CSharp) Method

Add() public method

public Add ( object item, bool isChecked ) : int
item object
isChecked bool
return int
			public int Add (object item, bool isChecked)
			{
				return Add (item, isChecked ? CheckState.Checked : CheckState.Unchecked);
			}
			

Same methods

CheckedListBox.ObjectCollection::Add ( object item, CheckState check ) : int

Usage Example

コード例 #1
0
        private void avgModeCheckboxChanged(object sender, EventArgs e)
        {
            if(AvgRadioButton.Checked)
            {
                AvgRadioButton.BackColor = Color.FromArgb(144, 195, 212);
                //avg urobit, ak neexistuje DataTable, vytvorit, inak iba prepnut.
                if (avgDataTable == null)
                {
                    DbCommunication db = new DbCommunication();
                    avgDataTable = db.meranieAvg(header_id).Tables[0];
                    avgItems = new CheckedListBox.ObjectCollection(checkedListBoxInclude);
                    foreach(DataColumn columnHeader in avgDataTable.Columns)
                    {
                        avgItems.Add(columnHeader.ToString());
                    }
                }
                dataMeranie.DataSource = avgDataTable;
                refreshIncludeColumns(avgItems);
                checkedListBoxCyklyInclude.Enabled = false;
                checkBoxCyklyAllInclude.Enabled = false;

            }
            else
            {
                AvgRadioButton.BackColor = default(Color);
            }
        }
All Usage Examples Of System.Windows.Forms.CheckedListBox.ObjectCollection::Add
CheckedListBox.ObjectCollection