private void cbXmlAll_CheckedChanged(object sender, EventArgs e)
{
for (int i = 0; i < cblXmlList.Items.Count; i++)
{
cblXmlList.SetItemChecked(i, cbXmlAll.Checked);
}
} private void cbXmlR_CheckedChanged(object sender, EventArgs e)
{
for (int i = 0; i < cblXmlList.Items.Count; i++)
{
cblXmlList.SetItemChecked(i, !cblXmlList.GetItemChecked(i));
}
}
cbXmlAll是checkbox,全选。cbXmlR是checkbox,反选。