public AwesomiumWebView(AwesomiumIWebView iwebview) { _IWebView = iwebview; _Dispatcher = new AwesomiumDispatcher(); _AwesomiumJavascriptObjectConverter = new AwesomiumJavascriptObjectConverter(_IWebView); _AwesomiumJavascriptObjectFactory = new AwesomiumJavascriptObjectFactory(_IWebView); }
private async void btnCheckIpAddress_Click(object sender, RoutedEventArgs e) { // browser = new Awesomium.Windows.Controls.WebControl(); btnCheckIpAddress.IsEnabled = false; using (Awesomium.Core.IWebView tempView = WebCore.CreateWebView(0, 0)) { await tempView.WaitPageLoadComplete(() => { tempView.Source = "api.ipify.org".ToUri(); }); string ipAddress = tempView.ExecuteJavascriptWithResult("document.body.textContent"); MessageBox.Show(string.Format("Reported IP Address [ipify.org]: {0}", ipAddress)); } btnCheckIpAddress.IsEnabled = true; }
public AwesomiumJavascriptObjectConverter(Awesomium_Core.IWebView webView) { _WebView = webView; }
public AwesomiumJavascriptObjectFactory(Awesomium_Core.IWebView iIWebView) { _IWebView = iIWebView; }
public AwesomiumJavascriptObjectConverter(Awesomium_Core.IWebView webView) { _WebView = webView; }