public Captcha Generate(int codeLength = 5, string backgroundColor = "Black") { cls = new CaptchaLibrary.CaptchaLibraryClass(codeLength, "", 200, 50); Color selectedColor = Color.FromName(backgroundColor); cls.BackgroundColor = new System.Drawing.SolidBrush(selectedColor); if (cls.BackgroundColor == null) { cls.BackgroundColor = new System.Drawing.SolidBrush(Color.Black); } return(Get()); }
/// <summary> /// Controller Constructor /// </summary> public CaptchaController() { cls = new CaptchaLibrary.CaptchaLibraryClass(5, "", 200, 50); cls.NumOfLines = 5; cls.BackgroundColor = new System.Drawing.SolidBrush(System.Drawing.Color.Black); }