Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaptchaInfo"/> class.
 /// </summary>
 /// <param name="text">The text.</param>
 public CaptchaInfo(string text)
 {
     Width = 180;
     Height = 50;
     _randomTextLength = 5;
     WarpFactor = CaptchaImage.FontWarpFactor.Low;
     FontFamily = string.Empty;
     _text = text;
     _validRandomTextChars = DefaultValidRandomTextChars;
     DateGenerated = DateTime.UtcNow;
     FontFamily = RandomFontFamily();
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaptchaInfo"/> class.
 /// </summary>
 /// <param name="text">The text.</param>
 public CaptchaInfo(string text)
 {
     this.Width = 180;
     this.Height = 50;
     this.randomTextLength = 5;
     this.WarpFactor = CaptchaImage.FontWarpFactor.Low;
     this.FontFamily = string.Empty;
     this.text = text;
     this.validRandomTextChars = defaultValidRandomTextChars;
     this.DateGenerated = DateTime.Now;
     this.FontFamily = RandomFontFamily();
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CaptchaInfo"/> class.
 /// </summary>
 /// <param name="text">The text.</param>
 public CaptchaInfo(string text)
 {
     Width                 = 180;
     Height                = 50;
     _randomTextLength     = 5;
     WarpFactor            = CaptchaImage.FontWarpFactor.Low;
     FontFamily            = string.Empty;
     _text                 = text;
     _validRandomTextChars = DefaultValidRandomTextChars;
     DateGenerated         = DateTime.UtcNow;
     FontFamily            = RandomFontFamily();
 }
 public CaptchaImage()
 {
     this._rand             = new Random();
     this._fontWarp         = CaptchaImage.FontWarpFactor.Low;
     this._backgroundNoise  = CaptchaImage.BackgroundNoiseLevel.Low;
     this._lineNoise        = CaptchaImage.LineNoiseLevel.None;
     this._width            = 180;
     this._height           = 40;
     this._randomTextLength = 5;
     this._fontFamilyName   = "";
     this._fontWhitelist    = "arial;courier new;estrangelo edessa;lucida console;lucida sans unicode;mangal;palatino linotype;sylfaen;tahoma;trebuchet ms;verdana";
     this._randomText       = this.GenerateRandomText();
     this._generatedAt      = DateTime.Now;
     this._guid             = Guid.NewGuid().ToString();
 }
Example #5
0
 public CaptchaImage()
 {
     this._rand             = new Random();
     this._fontWarp         = CaptchaImage.FontWarpFactor.Low;
     this._backgroundNoise  = CaptchaImage.BackgroundNoiseLevel.Low;
     this._lineNoise        = CaptchaImage.LineNoiseLevel.None;
     this._width            = 180;
     this._height           = 50;
     this._randomTextLength = 5;
     this._randomTextChars  = "ACDEFGHJKLNPQRTUVXYZ2346789";
     this._fontFamilyName   = "";
     this._fontWhitelist    = "arial;arial black;comic sans ms;courier new;estrangelo edessa;franklin gothic medium;georgia;lucida console;lucida sans unicode;mangal;microsoft sans serif;palatino linotype;sylfaen;tahoma;times new roman;trebuchet ms;verdana";
     this._randomText       = this.GenerateRandomText();
     this._generatedAt      = DateTime.Now;
     this._guid             = Guid.NewGuid().ToString();
 }
Example #6
0
 public CaptchaImage()
 {
     this._rand = new Random();
     this._fontWarp = CaptchaImage.FontWarpFactor.Low;
     this._backgroundNoise = CaptchaImage.BackgroundNoiseLevel.Low;
     this._lineNoise = CaptchaImage.LineNoiseLevel.None;
     this._width = 180;
     this._height = 50;
     this._randomTextLength = 5;
     this._randomTextChars = "ACDEFGHJKLNPQRTUVXYZ2346789";
     this._fontFamilyName = "";
     this._fontWhitelist = "arial;arial black;comic sans ms;courier new;estrangelo edessa;franklin gothic medium;georgia;lucida console;lucida sans unicode;mangal;microsoft sans serif;palatino linotype;sylfaen;tahoma;times new roman;trebuchet ms;verdana";
     this._randomText = this.GenerateRandomText();
     this._generatedAt = DateTime.Now;
     this._guid = Guid.NewGuid().ToString();
 }