private void OnFrameLoadStart(object sender, FrameLoadStartEventArgs e) { if (e.Frame.IsMain) { ActionExtension.InvokeInMainThread(() => PageLoadingStarted?.Invoke(this, new UrlEventArgs(e.Url ?? string.Empty))); } }
private void browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { if (e.Frame.IsMain && BrowserUtils.IsTwitterWebsite(e.Frame)) { ScriptLoader.ExecuteFile(e.Frame, "twitter.js"); } }
private void ChromiumWebBrowser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { ConsoleLogger.Debug(nameof(ChromiumWebBrowser_FrameLoadStart) + " : " + new { e.TransitionType, e.Url, }); Invoke(new Action(() => { toolStripStatusLabel_loading.Text = $"{e.TransitionType} {e.Url}"; })); foreach (ICrawlerPlugin plugin in CrawlerPlugins.Values) { try { plugin.ChromiumWebBrowser_FrameLoadStart(sender, e); } catch (Exception ex) { ConsoleLogger.Warn($"{plugin.Title}.{nameof(plugin.ChromiumWebBrowser_FrameLoadStart)} : {ex}"); } } }
private void Browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { if (!e.Frame.IsMain) { return; } lastUrl = e.Url; if (_api != null) { var initScript = @"(async () => { await CefSharp.BindObjectAsync('OverlayPluginApi'); OverlayPluginApi.overlayName = " + JsonConvert.SerializeObject(this.overlayName) + @"; OverlayPluginApi.overlayUuid = " + JsonConvert.SerializeObject(this.overlayUuid) + @"; OverlayPluginApi.ready = true; })();"; e.Frame.ExecuteJavaScriptAsync(initScript, "init"); } foreach (var item in this.scriptQueue) { e.Frame.ExecuteJavaScriptAsync(item, "injectOnLoad"); } this.scriptQueue.Clear(); try { BrowserStartLoading?.Invoke(this, new BrowserLoadEventArgs(0, e.Url)); } catch (Exception ex) { BrowserConsoleLog?.Invoke(this, new BrowserConsoleLogEventArgs(ex.ToString(), "", 1)); } }
private void UiBrowser_OnFrameStartLoad(object arg1, FrameLoadStartEventArgs arg2) { //Wait for the MainFrame to finish loading if (arg2.Frame.IsMain) { arg2.Frame.ExecuteJavaScriptAsync("alert('MainFrame start loading');"); } }
private void Browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { window.Dispatcher.Invoke(() => { var k = browser.Address; System.Diagnostics.Debug.WriteLine(k); }); }
private void chromiumBrowser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { siteLoad.Restart(); Pic_load.Image = Resources.cancel; siteLoading.Value = 40; Properties.Settings.Default.Charlie = Properties.Settings.Default.Charlie + 1; Properties.Settings.Default.Save(); }
private void HandleBrowserFrameLoadStart(object?sender, FrameLoadStartEventArgs e) { var s = string.Format(Properties.Resources.LOADING_FRAME, e.Frame.Identifier); StatusEvent?.Invoke(this, new WebBrowserProgressEventArgs { Description = s }); }
private void MWebBrowser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { try { mIBrowser.MainFrame.EvaluateScriptAsync("Object.defineProperty(this,'navigator',{value :{platform :\"Android\"}});"); } catch { } }
void ILoadHandler.OnFrameLoadStart(IWebBrowser chromiumWebBrowser, FrameLoadStartEventArgs frameLoadStartArgs) { try { chromiumWebBrowser.GetMainFrame().Browser.MainFrame.EvaluateScriptAsync("Object.defineProperty(this,'navigator',{value :{platform :\"Android\"}});"); } catch { } }
void browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { this.BeginInvoke(new Func <bool>(() => { checkjQuery(); return(true); })); }
private void OnFrameLoadStart(object sender, FrameLoadStartEventArgs e) { _inner.SetZoomLevel(Math.Log(_zoomLevel, 1.2)); if (e.Frame.IsMain) { ActionExtension.InvokeInMainThread(() => PageLoadingStarted?.Invoke(this, new UrlEventArgs(AlterUrl(e.Url)))); } }
private void OnFrameLoadStart(object sender, FrameLoadStartEventArgs e) { if (Debug) { DebugLog.Message("Frame.Name: " + e.Frame.Name); } return; }
/// <summary> /// The query results web browser_ on frame load start. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void QueryResultsWebBrowser_OnFrameLoadStart(object sender, FrameLoadStartEventArgs e) { this.Dispatcher.Invoke( delegate { this.queryResultsWebBrowser.Visibility = Visibility.Collapsed; LoadingTextBlock.Visibility = Visibility.Visible; }); }
private void BrowserSetup_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { Dispatcher.Invoke(() => { this.BrowserSetup.SetZoomLevel(-2); this.Show(); //this.BrowserSetup.ShowDevTools(); }); }
private void ChromiumWebBrowser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { Console.WriteLine("started"); this.Dispatcher.Invoke(() => { loading.Visibility = Visibility.Visible; ImageBehavior.GetAnimationController(loading).Play(); }); }
private void OnFrameLoadStart(object sender, FrameLoadStartEventArgs e) { if (e.Frame.IsMain) { ActionExtension.InvokeInMainThreadAsync(() => { Navigating?.Invoke(this, PageLoadingEventArgs.Indetermitate); }); } }
private void FrameLoadStart(object sender, FrameLoadStartEventArgs e) { var browser = (ChromiumWebBrowser)sender; if (e.Frame.IsMain) { SettingZoomLevel(this.Setting.ZoomLevel); } }
private void Browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { var w = sender as CustomChrominWebBrowser; if (w != null && w.ID != 0) { GetTaskViewModel(w); } }
private void RenderWebBrowserOnFrameLoadStart(object sender, FrameLoadStartEventArgs e) { _logger.LogDebug("Navigation started to url '{url}'", e.Frame.Url); if (Status == AppStatus.Authenticating && e.Frame.Url == SkypeWebAppUrl) { this.UpdateStatus(AppStatus.Authenticated); this.UpdateStatus(AppStatus.Loading); } }
private void WebView_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { Dispatcher.BeginInvoke((Action)(() => { RefreshImage.Source = stopBtn; refreshing = true; startPage.Visibility = Visibility.Hidden; })); }
private void Cwb_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { if (e.Url == "https://www.patreon.com/home" || e.Url == "https://www.patreon.com/creator-home") { _cwb.Stop(); _cwb.FrameLoadStart -= Cwb_FrameLoadStart; _cwb.Load("view-source:" + e.Url); } }
void IWebBrowserInternal.OnFrameLoadStart(FrameLoadStartEventArgs args) { var handler = FrameLoadStart; if (handler != null) { handler(this, args); } }
private void Browser_FrameLoadEnd(object sender, FrameLoadStartEventArgs e) { if (!GamePageLoaded) return; if (e.Frame.Name == "game_frame") { ApplyStyleSheet(); DestroyDMMreloadDialog(); } }
private async void Browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { if (Cef.IsInitialized) { if (await Browser.GetZoomLevelAsync() != _zoomLvl) { zoomLvl = _zoomLvl; } } }
void browser_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { if (showwaiteform)//我也搞不懂为什么这个start和end时间会进入两次所以做了这个标记 { showwaiteform = false; this.BeginInvoke(new Func <bool>(() => { return(true); })); } }
private void webClient_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { if (e.Url.Contains("#access_token=")) { string[] _tokenSep = new string[] { "=", "&" }; Libs.OAuth.OAuthToken = ((e.Url).Split(_tokenSep, StringSplitOptions.None)[1]); } else if (e.Url.Contains("?error=")) { MessageBox.Show(e.Url); } }
//Если в таск листе что-то есть, то ставим хэндл на windows.onload private void Wb_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { var path = new Uri(e.Url).AbsolutePath; if (TaskList.ContainsKey(path)) { string query = TaskList[path]; query = "window.onload=function() {" + query + " };"; e.Frame.EvaluateScriptAsync(query); TaskList.Remove(path); } }
private void WbControl_FrameLoadStart(object sender, FrameLoadStartEventArgs e) { var path = new Uri(e.Url).PathAndQuery; if (_taskList.ContainsKey(path)) { string query = _taskList[path]; query = "document.addEventListener('DOMContentLoaded', DomLoad); function DomLoad() {" + query + "}; "; e.Frame.EvaluateScriptAsync(query); _taskList.Remove(path); } }
/// <inheritdoc /> protected override void OnFrameLoadStart(IWebBrowser chromiumWebBrowser, FrameLoadStartEventArgs args) { var browser = args.Browser; if (browser.IsPopup) { var control = ChromiumHostControl.FromBrowser(browser); control?.OnFrameLoadStart(args); } base.OnFrameLoadStart(chromiumWebBrowser, args); }