public List<string> GetCaptchaQuestion() { CaptchaAccess access=new CaptchaAccess(); try { XmlDocument doc = access.GetCaptchaObject(); XmlNodeList question = doc.DocumentElement.SelectNodes("question"); XmlNodeList answers = doc.DocumentElement.SelectNodes("answer"); List<string> ret = new List<string> { (from XmlNode node in question select node.InnerText).FirstOrDefault() }; ret.AddRange(from XmlNode answer in answers select answer.InnerText); return ret; } catch (Exception e) { throw e; } }
public string CreateCaptcha() { CaptchaAccess ac= new CaptchaAccess(); return ac.CreateCaptcha(); }