public AwesomiumHTMLWindow(WebControl iWebControl) { _WebControl = iWebControl; _WebControl.SynchronousMessageTimeout = 0; _WebControl.ExecuteWhenReady(FireLoaded); _WebControl.ConsoleMessage += _WebControl_ConsoleMessage; _WebControl.Crashed += _WebControl_Crashed; MainFrame = new AwesomiumWebView(_WebControl); }
private async Task InitAsync(string ipath, IWebSessionLogger logger) { var taskLoaded = new TaskCompletionSource <object>(); WebCore.QueueWork(() => { _CurrentWebView = WebCore.CreateWebView(500, 500); var uri = new Uri(ipath); _CurrentWebView.Source = uri; WebView = new AwesomiumWebView(_CurrentWebView); _AwesomiumTestHTMLWindowProvider = new AwesomiumTestHTMLWindowProvider(WebView, uri); var viewReadyExecuter = new ViewReadyExecuter(_CurrentWebView, () => { taskLoaded.TrySetResult(null); }); viewReadyExecuter.Do(); }); await taskLoaded.Task; }
private async Task InitAsync(string ipath, IWebSessionLogger logger) { var taskLoaded = new TaskCompletionSource<object>(); WebCore.QueueWork( () => { _CurrentWebView = WebCore.CreateWebView(500, 500); var uri = new Uri(ipath); _CurrentWebView.Source = uri; WebView = new AwesomiumWebView(_CurrentWebView); _AwesomiumTestHTMLWindowProvider = new AwesomiumTestHTMLWindowProvider(WebView, uri); var viewReadyExecuter = new ViewReadyExecuter(_CurrentWebView, () => { taskLoaded.TrySetResult(null); }); viewReadyExecuter.Do(); }); await taskLoaded.Task; }