private void web_DocumentReady(object sender, DocumentReadyEventArgs e) { flatTextBox.Text = web.Source.ToString(); btnBack.Visibility = web.CanGoBack() ? Visibility.Visible : Visibility.Hidden; btnForward.Visibility = web.CanGoForward() ? Visibility.Visible : Visibility.Hidden; }
/// <summary> /// OnDocumentReady contains actions to be performed once /// HERMES is completely loaded in Awesomium browser /// </summary> private async void OnDocumentReady(object sender, DocumentReadyEventArgs e) { Debug.WriteLine("dom loaded"); // Wait for all DOM to be loaded. if (e.ReadyState != Awesomium.Core.DocumentReadyState.Loaded) return; //inter.TestGet(); //string endPoint = @"https:\\aii-hermes.org\aii-api-v2\v1\audioConditionList\"; //var client = new RestClient(endPoint); //var json = client.MakeRequest(); //WriteMessage(json); //create the constructor with post type and few data // MyWebRequest myRequest = new MyWebRequest("http://localhost/Github/aii-hermes.org/aii-api-v2/v1/audioConditionList", "GET"); //show the response string on the console screen. //Debug.WriteLine(myRequest.GetResponse()); //var jsonString = myRequest.GetResponse(); }
private void OnDocumentReady(object sender, DocumentReadyEventArgs e) { if (e.ReadyState == DocumentReadyState.Ready && _inner.IsDocumentReady) { if (_inner.ExecuteJavascriptWithResult(@"window.__cm_loaded").IsBoolean) return; ModifyPage(); var userCss = _styleProvider?.ToScript(_inner.Source.OriginalString); if (userCss != null) { Execute(userCss); } Navigated?.Invoke(this, new PageLoadedEventArgs(_inner.Source.OriginalString)); } }