public HWProfileForm(EveAccount eA) { this.EA = eA; InitializeComponent(); Text = string.Format("HWProfile [{0}]",EA.CharacterName); }
private void CreateEverythingAndVerify2(string eveRegLink,string accountName,string password, string captchaResponse,string proxyPort, string proxyUserPassword) { string emailName = Get10MinuteEmailName(proxyPort,proxyUserPassword); Cache.Instance.Log("Email generated. Email: " + emailName); string eveacc = CreateEveAccount(eveRegLink,emailName,accountName,password, proxyPort, proxyUserPassword); Cache.Instance.Log(eveacc.Contains("transactionTotal") ? "Eve account created!" : "Eve account creation failed." ); if(!eveacc.Contains("transactionTotal")) return; string inboxurl = "http://10minutemail.com/10MinuteMail/index.html"; string tmp = ""; for(int i=0;i<9999;i++){ Cache.Instance.Log("checking email every 5 seconds.. i= " + i); tmp = CurlManager.Instance.GetPostPage(inboxurl,"",proxyPort,proxyUserPassword,false); Application.DoEvents(); Thread.Sleep(2000); if (tmp.Contains("services.eveonline.com")) { Cache.Instance.Log("Email found!"); break; } } if (tmp.Contains("services.eveonline.com")) { HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument(); htmlDoc = new HtmlAgilityPack.HtmlDocument(); Cache.Instance.Log("Email found!"); htmlDoc.LoadHtml(tmp); HtmlNode.ElementsFlags.Remove("form"); string link = default(string); foreach (HtmlNode text in htmlDoc.DocumentNode.SelectNodes("//a[contains(@href, 'dataModelSelection')]")) { if (text.OuterHtml.Contains("dataModelSelection")) link = "http://10minutemail.com" + text.GetAttributeValue("href",""); } link = HttpUtility.HtmlDecode(link); Cache.Instance.Log("inbox link: " + link); if (link.Length > 1) { Cache.Instance.Log("Email link found! Link: " + link); tmp = CurlManager.Instance.GetPostPage(link,"",proxyPort,proxyUserPassword,false); string veriLink = ""; htmlDoc.LoadHtml(tmp); foreach (HtmlNode text in htmlDoc.DocumentNode.SelectNodes("//a[contains(@href, 'links.services.eveonline.com/ctt?kn=3')]")) { if (text.OuterHtml.Contains("links.services.eveonline.com")) veriLink = text.GetAttributeValue("href",""); } veriLink = veriLink.Replace("amp;",""); if ( veriLink.Length > 1) { Cache.Instance.Log("Verfication link found! verink: " + veriLink); } tmp = CurlManager.Instance.GetPostPage(veriLink,"",proxyPort,proxyUserPassword,false); if (tmp.ToLower().Contains(("for verifying").ToLower())){ Cache.Instance.Log("Email verification was successful! - Adding Account to Database"); lock(Cache.Instance.EveAccountSerializeableSortableBindingList.List){ EveAccount eA = new EveAccount(accountName,accountName,password,DateTime.UtcNow,DateTime.UtcNow,false,false,false); var worker = new BackgroundWorker(); worker.DoWork += (sender, e) => { // call the XYZ function Cache.Instance.EveAccountSerializeableSortableBindingList.List.Add(eA); }; worker.RunWorkerCompleted += (sender, e) => { // use the result of the XYZ function: var result = e.Result; // Here you can safely manipulate the GUI controls }; worker.RunWorkerAsync(); //Cache.Instance.EveAccountSerializeableSortableBindingList.List.Add(eA); //WCFClient.Instance.GetPipeProxy.AddNewEveAccount(eA); } } } } }