public WebPage(WebView webView) { //Create the WebControl and WebView m_WebControl = new EO.WebBrowser.Wpf.WebControl(); if (webView == null) { webView = new EO.WebBrowser.WebView(); } m_WebView = webView; m_WebControl.WebView = m_WebView; //Handle various UI related events m_WebView.TitleChanged += new EventHandler(m_WebView_TitleChanged); m_WebView.FaviconChanged += new EventHandler(m_WebView_FaviconChanged); m_WebView.ConsoleMessage += new ConsoleMessageHandler(m_WebView_ConsoleMessage); //Register the custom protocol handler m_WebView.RegisterResourceHandler(new SampleHandler()); }
public BrowserWindow(CaptchaSolverWindow solver, Engine engine) { Class7.RIuqtBYzWxthF(); this.InitializeComponent(); this._browser1View = new Browser1View(); this._browser2View = new Browser2View(); this._browser3View = new Browser3View(this); this._browser4View = new Browser4View(); this._solver = solver; this._webControl1 = new WebControl(); this._browser1 = new EO.Wpf.WebView(); this._browser1.CertificateError += new CertificateErrorHandler(this._browser1_CertificateError); this._browser1.Engine = engine; this._webControl1.WebView = this._browser1; this._browser1View.border1.Child = this._webControl1; this._browser1.LoadUrl("https://www.gmail.com"); this._webControl2 = new WebControl(); this._browser2 = new EO.Wpf.WebView(); this._browser2.CertificateError += new CertificateErrorHandler(this._browser2_CertificateError); this._browser2.Engine = engine; this._webControl2.WebView = this._browser2; this._browser2View.border2.Child = this._webControl2; this._browser2.LoadUrl("https://www.youtube.com"); this._webControl3 = new WebControl(); this._browser3 = new EO.Wpf.WebView(); this._browser3.CertificateError += new CertificateErrorHandler(this._browser3_CertificateError); this._browser3.Engine = engine; this._webControl3.WebView = this._browser3; this._browser3View.border3.Child = this._webControl3; this._webControl4 = new WebControl(); this._browser4 = new EO.Wpf.WebView(); this._browser4.CertificateError += new CertificateErrorHandler(this._browser4_CertificateError); this._browser4.Engine = engine; this._webControl4.WebView = this._browser4; this._browser4View.border4.Child = this._webControl4; this._browser4.LoadUrl("https://www.whatismyip.com"); this.MenusFrame.Navigate(this._browser1View); }
public CaptchaSolverWindow(string name) { Class7.RIuqtBYzWxthF(); this.m_lock = new object(); this.assign_lock = new object(); this.IsFree = true; this.IsUserEnabled = true; this.InitializeComponent(); this._name = name; switch (this._name) { case "window1": this.IsUserEnabled = Global.SETTINGS.Solver1Enabled; break; case "window2": this.IsUserEnabled = Global.SETTINGS.Solver2Enabled; break; case "window3": this.IsUserEnabled = Global.SETTINGS.Solver3Enabled; break; case "window4": this.IsUserEnabled = Global.SETTINGS.Solver4Enabled; break; case "window5": this.IsUserEnabled = Global.SETTINGS.Solver5Enabled; break; } WebControl control1 = new WebControl { Width = 410.0, Height = 540.0 }; this._webControl = control1; this.border.Width = 410.0; this.border.Height = 540.0; this._engine = Engine.Create(this._name); this._engine.Options.CachePath = AppDomain.CurrentDomain.BaseDirectory + @"\Cache\" + this._name; string str = this._name; switch (str) { case "window2": { if (string.IsNullOrEmpty(Global.SETTINGS.Solver2ProxyList) || !Global.SETTINGS.PROXIES.Any <ProxyListObject>(x => (x.Id == Global.SETTINGS.Solver2ProxyList))) { this.txtTitle.Text = this.txtTitle.Text + " - local IP"; break; } ProxyObject proxy = Helpers.GetProxy(Global.SETTINGS.PROXIES.First <ProxyListObject>(x => x.Id == Global.SETTINGS.Solver2ProxyList)); if (proxy != null) { if (string.IsNullOrEmpty(proxy.Username)) { ProxyInfo info2 = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port); this._engine.Options.Proxy = info2; } else { ProxyInfo info9 = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port, proxy.Username, proxy.Password); this._engine.Options.Proxy = info9; } this.txtTitle.Text = this.txtTitle.Text + " - " + proxy.IP; } break; } case "window3": { if (string.IsNullOrEmpty(Global.SETTINGS.Solver3ProxyList) || !Global.SETTINGS.PROXIES.Any <ProxyListObject>(x => (x.Id == Global.SETTINGS.Solver3ProxyList))) { this.txtTitle.Text = this.txtTitle.Text + " - local IP"; break; } ProxyObject proxy = Helpers.GetProxy(Global.SETTINGS.PROXIES.First <ProxyListObject>(x => x.Id == Global.SETTINGS.Solver3ProxyList)); if (proxy != null) { if (string.IsNullOrEmpty(proxy.Username)) { ProxyInfo info3 = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port); this._engine.Options.Proxy = info3; } else { ProxyInfo info = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port, proxy.Username, proxy.Password); this._engine.Options.Proxy = info; } this.txtTitle.Text = this.txtTitle.Text + " - " + proxy.IP; } break; } case "window4": { if (string.IsNullOrEmpty(Global.SETTINGS.Solver4ProxyList) || !Global.SETTINGS.PROXIES.Any <ProxyListObject>(x => (x.Id == Global.SETTINGS.Solver4ProxyList))) { this.txtTitle.Text = this.txtTitle.Text + " - local IP"; break; } ProxyObject proxy = Helpers.GetProxy(Global.SETTINGS.PROXIES.First <ProxyListObject>(x => x.Id == Global.SETTINGS.Solver4ProxyList)); if (proxy != null) { if (string.IsNullOrEmpty(proxy.Username)) { ProxyInfo info4 = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port); this._engine.Options.Proxy = info4; } else { ProxyInfo info8 = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port, proxy.Username, proxy.Password); this._engine.Options.Proxy = info8; } this.txtTitle.Text = this.txtTitle.Text + " - " + proxy.IP; } break; } case "window1": if (!string.IsNullOrEmpty(Global.SETTINGS.Solver1ProxyList) && Global.SETTINGS.PROXIES.Any <ProxyListObject>(x => (x.Id == Global.SETTINGS.Solver1ProxyList))) { ProxyObject proxy = Helpers.GetProxy(Global.SETTINGS.PROXIES.First <ProxyListObject>(x => x.Id == Global.SETTINGS.Solver1ProxyList)); if (proxy != null) { if (!string.IsNullOrEmpty(proxy.Username)) { ProxyInfo info5 = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port, proxy.Username, proxy.Password); this._engine.Options.Proxy = info5; } else { ProxyInfo info10 = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port); this._engine.Options.Proxy = info10; } this.txtTitle.Text = this.txtTitle.Text + " - " + proxy.IP; } } else { this.txtTitle.Text = this.txtTitle.Text + " - local IP"; } break; default: if (str == "window5") { if (!string.IsNullOrEmpty(Global.SETTINGS.Solver5ProxyList) && Global.SETTINGS.PROXIES.Any <ProxyListObject>(x => (x.Id == Global.SETTINGS.Solver5ProxyList))) { ProxyObject proxy = Helpers.GetProxy(Global.SETTINGS.PROXIES.First <ProxyListObject>(x => x.Id == Global.SETTINGS.Solver5ProxyList)); if (proxy != null) { if (!string.IsNullOrEmpty(proxy.Username)) { ProxyInfo info7 = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port, proxy.Username, proxy.Password); this._engine.Options.Proxy = info7; } else { ProxyInfo info6 = new ProxyInfo(ProxyType.HTTP, proxy.IP, proxy.Port); this._engine.Options.Proxy = info6; } this.txtTitle.Text = this.txtTitle.Text + " - " + proxy.IP; } } else { this.txtTitle.Text = this.txtTitle.Text + " - local IP"; } } break; } this._browser = new EO.WebBrowser.WebView(); this._browser.Engine = this._engine; BrowserOptions options = new BrowserOptions { AllowJavaScript = true, AllowJavaScriptAccessClipboard = true, AllowJavaScriptDOMPaste = true, EnableXSSAuditor = false, EnableWebSecurity = false }; this._browser.SetOptions(options); this._webControl.WebView = this._browser; this._browser.CertificateError += new CertificateErrorHandler(this._browser_CertificateError); this._browser.RegisterJSExtensionFunction("submit", new JSExtInvokeHandler(this.Solved)); this.border.Child = this._webControl; this._browser.LoadCompleted += new LoadCompletedEventHandler(this._browser_LoadCompleted); this.Change(); }
string gestureState = "--"; // initialise public GestureResultView(int bodyIndex, bool isTracked, bool detected, float confidence, EO.WebBrowser.WebView webView1, string gestureState) { /// Initializes a new instance of the GestureResultView class and sets initial property values this.BodyIndex = bodyIndex; this.IsTracked = isTracked; this.Detected = detected; this.Confidence = confidence; this.webView1 = webView1; this.gestureState = gestureState; }