コード例 #1
0
        /**
         * <param name="callback">A delegate to call when the CAPTCHA is solved or timed out.</param>
         * <param name="img">Raw CAPTCHA image.</param>
         * <param name="timeout">Solving timeout (in seconds).</param>
         * <param name="ext_data">Extra data used by special captchas types.</param>
         */
        public void Decode(DecodeDelegate callback, int timeout, Hashtable ext_data = null)
        {
            PollPayload payload = new PollPayload();

            payload.Callback = callback;
            payload.Captcha  = this.Upload(ext_data);
            payload.Timeout  = timeout;
            new Thread(PollWithCallback).Start(payload);
        }
コード例 #2
0
ファイル: Client.cs プロジェクト: syntox/DreamAmazon
        /**
         * <param name="callback">A delegate to call when the CAPTCHA is solved or timed out.</param>
         * <param name="img">Raw CAPTCHA image.</param>
         * <param name="timeout">Solving timeout (in seconds).</param>
         */
        public void Decode(DecodeDelegate callback, byte[] img, int timeout)
        {
            PollPayload payload = new PollPayload();

            payload.Callback = callback;
            payload.Captcha  = this.Upload(img);
            payload.Timeout  = timeout;
            new Thread(PollWithCallback).Start(payload);
        }
コード例 #3
0
        protected void PollWithCallback(object state)
        {
            PollPayload payload = (PollPayload)state;

            payload.Callback(this.Poll(payload.Captcha, payload.Timeout));
        }
コード例 #4
0
ファイル: Client.cs プロジェクト: DreamAmazon/DreamAmazon
 /**
  * <param name="callback">A delegate to call when the CAPTCHA is solved or timed out.</param>
  * <param name="img">Raw CAPTCHA image.</param>
  * <param name="timeout">Solving timeout (in seconds).</param>
  */
 public void Decode(DecodeDelegate callback, byte[] img, int timeout)
 {
     PollPayload payload = new PollPayload();
     payload.Callback = callback;
     payload.Captcha = this.Upload(img);
     payload.Timeout = timeout;
     new Thread(PollWithCallback).Start(payload);
 }