コード例 #1
0
ファイル: Captcha.cs プロジェクト: sasha237/NorthCitadel
 public ResolvedCaptcha GetResolvedCaptcha()
 {
     Captcha c=new Captcha("http://www.erepublik.com/en");
     return new ResolvedCaptcha(c.ChallengeID, c.ResolveAntigate(m_Key));
 }
コード例 #2
0
ファイル: Captcha.cs プロジェクト: sasha237/NorthCitadel
 public ResolvedCaptcha GetResolvedCaptcha()
 {
     lock(Form)
     {
         Init();
         Captcha c=new Captcha("http://www.erepublik.com/en");
         var stream=new System.IO.MemoryStream(c.Image);
         var img=System.Drawing.Image.FromStream(stream);
         PicBox.Image=img;
         PicBox.Width=img.Width;
         PicBox.Height=img.Height;
         Form.Width=PicBox.Width+5;
         Form.Height=PicBox.Height+Form.Height-Form.ClientSize.Height+30;
         TextBox.Top=PicBox.Height;
         TextBox.Width=PicBox.Width;
         TextBox.Height=30;
         TextBox.Focus();
         TextBox.Text="";
         Form.ShowDialog();
         return new ResolvedCaptcha(c.ChallengeID,TextBox.Text);
     }
 }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: sasha237/NorthCitadel
 private void AddCaptcha()
 {
     _currentCaptcha = new Captcha("http://www.erepublik.com/en");
     BeginInvoke(new EventHandler(ShowCaptcha));
 }