예제 #1
0
        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;
            }
        }
예제 #2
0
 public string CreateCaptcha()
 {
     CaptchaAccess ac= new CaptchaAccess();
     return ac.CreateCaptcha();
 }