private void WebBrowser_OnPageLoaded(object sender, PageLoadedEventArgs e) { var uri = e.Url; SrsCommon(); var query = Regex.Match(uri, @"/(\w+?)\d*\.php", RegexOptions.IgnoreCase); var page = query.Success ? query.Groups[1].Value.ToLowerInvariant() : null; Logging.Debug(page); switch (page) { case "select": SrsSelectCar(); break; case "unregsrs": SrsUnregister(); break; case "race": SrsMain(); break; } }
private void WebBrowser_OnPageLoaded(object sender, PageLoadedEventArgs e) { var uri = e.Url; var match = Regex.Match(uri, @"\beventId=(\d+)"); if (match.Success) { Model.EventId = match.Groups[1].Value; } else { var trackId = Regex.Match(uri, @"\btrack(?:Id)?=(\d+)"); var carId = Regex.Match(uri, @"\bcar(?:Id)?=(\d+)"); if (trackId.Success && carId.Success) { Model.EventId = trackId.Groups[1].Value + @"/" + carId.Groups[1].Value; } else { Model.EventId = null; } } if (uri.Contains(@"page=setups")) { WebBrowser.Execute(@" window.addEventListener('load', function(){ var ths = document.getElementsByTagName('th'); for (var i=0; i<ths.length; i++) if (ths[i].innerHTML == 'Download') ths[i].innerHTML = 'Install'; var hs = document.getElementsByTagName('a'); for (var i=0, m; i<hs.length; i++) if (m = hs[i].href.match(/=download_setup&id=(\d+)/)) hs[i].href = 'acmanager://rsr/setup?id=' + m[1]; }, false);"); } }
private void PresenterOnPageLoaded(object sender, PageLoadedEventArgs args) { Debug("PageLoaded:" + args.KindOfPage + " " + args.Content); if (args.KindOfPage == KindOfPage.Current) { _currentPage = args.Content; DisplayLinesOfCurrentPage(); } long size = _presenter.GetFileSize(); ShowSizeOfFile(size); }
private void OnPageLoaded(object sender, PageLoadedEventArgs e) { WebBrowser.Execute(@" document.addEventListener('mouseup', function(){ window.external.Update(window.getSelection().toString()); }, false); document.addEventListener('mousedown', function(e){ if (e.target.getAttribute('target') == '_blank'){ e.target.setAttribute('target', '_parent'); } }, false);"); }
/// <summary> /// Loaded handler that is called once the page and all sections /// have been initialized. /// </summary> public virtual void Loaded(object sender, PageLoadedEventArgs e) { }
void ITeamExplorerPage.Loaded(object sender, PageLoadedEventArgs e) { }
void ITeamExplorerPage.Loaded(object sender, PageLoadedEventArgs e) { throw new NotImplementedException(); }
void _sut_PageLoaded(object sender, PageLoadedEventArgs e) { _currentPage = e.Content; Log.Debug("Page is loaded"); }
public virtual void Loaded(object sender, PageLoadedEventArgs e) { }
private void Context_PageLoaded(object sender, PageLoadedEventArgs e) { if (e.Thread != null) { _reloaded = false; PostJumpList.Opacity = 0; ThreadContentView.Base = "www"; string uri = this._context.HtmlUri; ThreadContentView.Navigate(new Uri(uri, UriKind.RelativeOrAbsolute)); } else { App.IsBusy = false; } }
protected internal virtual void OnPageLoaded(PageLoadedEventArgs e) { var handler = PageLoaded; if (handler != null) { handler(this, e); } }
void MainWindow_PageLoadedEvent(object sender, PageLoadedEventArgs e) { }
private void Context_PageLoaded(object sender, PageLoadedEventArgs e) { this.threadViewCanvas.IsHitTestVisible = true; this.threadViewCanvas.StopPullToRefreshLoading(true); if (this._defaultAppBar != null) { IApplicationBarIconButton reply = this._defaultAppBar.Buttons[replyButton] as IApplicationBarIconButton; reply.IsEnabled = true; IApplicationBarIconButton refresh = this._defaultAppBar.Buttons[refreshButton] as IApplicationBarIconButton; refresh.Text = "refresh"; refresh.IconUri = this._refreshUri; IApplicationBarIconButton next = this._defaultAppBar.Buttons[nextButton] as IApplicationBarIconButton; if (e.PageNumber == this._currentThread.MaxPages) { next.IsEnabled = false; } else { next.IsEnabled = true; } IApplicationBarIconButton prev = this._defaultAppBar.Buttons[prevButton] as IApplicationBarIconButton; if (e.PageNumber == 1) { prev.IsEnabled = false; } else { prev.IsEnabled = true; } } if (e.Thread == null) { MessageBox.Show("Could not load the requested page. Check your connection settings and try again.", ":(", MessageBoxButton.OK); } else { (e.Thread as SAThread).HasViewedToday = true; this._currentThread = e.Thread; ThreadSelected.Fire(this, new ValueEventArgs<SAThread>(this._currentThread as SAThread)); } this._currentPageNumber = e.PageNumber; this._lastPostIndex = this._context.PostIndex; }