示例#1
0
 private void btnConfirm_Click(object sender, EventArgs e)
 {
     foreach (Control crl in Controls)
     {
         CheckBox cbx = new CheckBox();
         if(crl.GetType() == cbx.GetType())
         {
             cbx = (CheckBox)crl;
         }
         else { return; }
         if (cbx.Checked)
             chosenQualifications.Add(cbx.Text);
         Close();
     }
 }
示例#2
0
 static string GetCheckBoxState(CheckBox checkbox)
 {
     return checkbox.GetType().ToString() + ":" + (checkbox.Checked == true ? "1" : "0");
 }