Esempio n. 1
0
 /// <summary>
 /// This method is change captcha setting when changed captcha preferences.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CBoxs_CheckedChanged(object sender, EventArgs e)
 {
     if (RBtnNormCaptcha.Checked)
     {
         cp.ChangeNormCaptchaSettings(CBoxNumeric.Checked, CBoxLowCaseChar.Checked,
                                      CBoxUpCaseChar.Checked, CBoxSymbol.Checked, CBoxLine.Checked,
                                      CBoxNoise.Checked, CBoxMessy.Checked, CBoxDistImg.Checked);
     }
     else if (RBtnMathCaptcha.Checked)
     {
         cp.ChangeMathCaptchaSettings(CBoxAdd.Checked, CBoxSubt.Checked,
                                      CBoxMultp.Checked, CBoxDiv.Checked, CBoxLine.Checked,
                                      CBoxNoise.Checked, CBoxMessy.Checked, CBoxDistImg.Checked);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// This method is change captcha setting when changed captcha preferences.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RBtns_CheckedChanged(object sender, EventArgs e)
        {
            if (RBtnNormCaptcha.Checked)
            {
                cp = new WinFormCaptcha(int.Parse(NumTextLength.Value.ToString()),
                                        PanelCaptcha.Width, PanelCaptcha.Height, CBoxNumeric.Checked,
                                        CBoxLowCaseChar.Checked, CBoxUpCaseChar.Checked, CBoxSymbol.Checked,
                                        CBoxLine.Checked, CBoxNoise.Checked, CBoxMessy.Checked, CBoxDistImg.Checked);

                cp.ChangeNormCaptchaSettings(CBoxNumeric.Checked, CBoxLowCaseChar.Checked,
                                             CBoxUpCaseChar.Checked, CBoxSymbol.Checked, CBoxLine.Checked,
                                             CBoxNoise.Checked, CBoxMessy.Checked, CBoxDistImg.Checked);
            }
            else if (RBtnMathCaptcha.Checked)
            {
                cp.ChangeMathCaptchaSettings(CBoxAdd.Checked, CBoxSubt.Checked,
                                             CBoxMultp.Checked, CBoxDiv.Checked, CBoxLine.Checked,
                                             CBoxNoise.Checked, CBoxMessy.Checked, CBoxDistImg.Checked);

                cp = new WinFormCaptcha(PanelCaptcha.Width, PanelCaptcha.Height, CBoxAdd.Checked,
                                        CBoxSubt.Checked, CBoxMultp.Checked, CBoxDiv.Checked, CBoxLine.Checked,
                                        CBoxNoise.Checked, CBoxMessy.Checked, CBoxDistImg.Checked);
            }
        }