コード例 #1
0
ファイル: frmQualifications.cs プロジェクト: matpmag/STUDIO2
 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
ファイル: GuiState.cs プロジェクト: paopaofeng/dp2
 static string GetCheckBoxState(CheckBox checkbox)
 {
     return checkbox.GetType().ToString() + ":" + (checkbox.Checked == true ? "1" : "0");
 }