private void simpleButton1_Click(object sender, EventArgs e)
{
List lb_list = new List();
foreach (CheckedListBoxItem lba in check_lxr.Items)
{
if (lba.CheckState == CheckState.Checked && lba.Value.ToString() != “全选”)
{
lb_list.Add(lba.Value.ToString());
}
}
string x_lb = string.Empty;
if (lb_list.Count > 0)
{
foreach (string zt in lb_list)
{
x_lb += zt + “,”;
}
}
lb = x_lb;
this.Close();
}
private void check_lxr_ItemCheck(object sender, DevExpress.XtraEditors.Controls.ItemCheckEventArgs e)
{
CheckedListBoxControl clb = sender as CheckedListBoxControl;
if (clb.Text == "全选" )
{
if (e.State == CheckState.Checked)
{
for (int i = 0; i < check_lxr.Items.Count; i++)
{
check_lxr.SetItemChecked(i, true);
}
}
else
{
for (int i = 0; i < check_lxr.Items.Count; i++)
{
check_lxr.SetItemChecked(i, false);
}
}
}
}