internal CaptchaResult(ICaptchaImage image, int quality, int width, int height)
 {
     this.image = image;
     this.quality = quality;
     this.width = width;
     this.height = height;
 }
Esempio n. 2
0
 internal CaptchaResult(ICaptchaImage image, int quality, int width, int height)
 {
     this.image   = image;
     this.quality = quality;
     this.width   = width;
     this.height  = height;
 }
 public static CaptchaResult Captcha(this Controller controller, ICaptchaImage captchaImage, int quality = 50, int width = 150, int height = 45 )
 {
     var captchaValue = captchaImage as ICaptchaValue;
     if (captchaValue != null)
         controller.Session[CaptchaConstants.CaptchaUniqueIdPrefix + captchaImage.CaptchaUniqueId] = captchaValue.RenderedValue;
     return new CaptchaResult(captchaImage, quality, width, height);
 }
Esempio n. 4
0
        public static CaptchaResult Captcha(this Controller controller, ICaptchaImage captchaImage, int quality = 50, int width = 150, int height = 45)
        {
            var captchaValue = captchaImage as ICaptchaValue;

            if (captchaValue != null)
            {
                controller.Session[CaptchaConstants.CaptchaUniqueIdPrefix + captchaImage.CaptchaUniqueId] = captchaValue.RenderedValue;
            }
            return(new CaptchaResult(captchaImage, quality, width, height));
        }