winform 点击全选
代码如下:
#region 全选 //chkAll_Checked即全选控键的点击事件 private void chkAll_CheckedChanged(object sender, EventArgs e) { if (chkAll.Checked) { chkSun.Checked = true; chkMon.Checked = true; chkThu.Checked = true; chkTue.Checked = true; chkWed.Checked = true; chkFri.Checked = true; chkSat.Checked = true; } else { chkSun.Checked = false; chkMon.Checked = false; chkThu.Checked = false; chkTue.Checked = false; chkWed.Checked = false; chkFri.Checked = false; chkSat.Checked = false; } } #endregion