private LoginAlert LoginAccount(Account account, LoginAlert alert) { string result = "Success"; try { LoginJob job = new LoginJob(); job.Login(account); } catch (Exception ex) { result = "Failure."; App.Current.Dispatcher.Invoke((Action) delegate { ExceptionAlert exceptionAlert = new ExceptionAlert(ex); OnAlertRaised(exceptionAlert); }); } // Blocking call to the dispatcher. App.Current.Dispatcher.Invoke((Action) delegate { alert.Detail += result; }); return(alert); }
private void buttonLogin_Click(object sender, EventArgs e) { /*System.Diagnostics.Process process = System.Diagnostics.Process.Start("iexplore.exe", "about:blank"); System.Threading.Thread.Sleep(1000); SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass(); foreach (SHDocVw.InternetExplorer Browser in shellWindows) { if (Browser.LocationURL.Contains("about:blank")) { //SetWindowPos((IntPtr)Browser.HWND, 0, 0, 0, 1000, 800, 0x40); Browser.Navigate("http://moni.51hupai.org:8081"); } }*/ LoginJob job = new LoginJob(this.m_orcLogin); job.Execute(); }
private void buttonLogin_Click(object sender, EventArgs e) { LoginJob loginJob = new LoginJob(this.m_orcCaptchaLoading); loginJob.Execute(); //SubmitPriceStep1Job submitPriceJob = new SubmitPriceStep1Job( // this.m_orcCaptchaLoading, // this.m_orcCaptchaTipsUtil, // this.m_orcCaptcha); //submitPriceJob.Execute(); }