public void addBehavior(MouseOverOnBrowser methodMouseOverOnBrowser, OnClickOnBrowser methodOnClickOnBrowser) { UCWebBrowserEx currentWb = this.getBrowserByTabIndex(this.tabControl_Browser.TabIndex); this._methodMouseOverOnBrowser = methodMouseOverOnBrowser; this._methodOnClickOnBrowser = methodOnClickOnBrowser; currentWb.AddBehaviorModel(this.methodBeforeAddBehavior, this.methodAfterAddBehavior, this.methodThrowExcepotion, this.methodOnClickOnBrowser, this.methodMouseOverOnBrowser); }
private void btn_StartAnalyse_Click(object sender, EventArgs e) { UCWebBrowserEx browser = this.ucWebBrowser.Browser; HtmlElement body = browser.Document.Body; this.treeView_Tags.Nodes.Clear(); this.treeView_Tags.Nodes.Add(this.analysisElement(body)); }
public BehaviorModel(UCWebBrowserEx wb, BeforeAddBehavior methodBeforeAddBehavior, AfterAddBehavior methodAfterAddBehavior, ThrowException methodThrowException, OnClick methodOnClick, MouseOverOnBrowser methodMouseOverOnBrowser) { this._webBrowser = wb; this._methodBeforeAddBehavior = methodBeforeAddBehavior; this._methodAfterAddBehavior = methodAfterAddBehavior; this._methodThrowException = methodThrowException; this._methodClick = methodOnClick; this._methodMouseOverOnBrowser = methodMouseOverOnBrowser; this.AttachEvent(); }
private void findElementInDom(List <int> positionList) { UCWebBrowserEx browser = this.ucWebBrowser.Browser; HtmlElement element = browser.Document.Body; foreach (int pos in positionList) { element = element.Children[pos]; } this.ucWebBrowser.addBehavior(this.methodMouseOverOnBrowser, this.methodOnClickOnBrowser); this.ucWebBrowser.MarkElement(element); }
private void lockElementInTree(HtmlElement element) { UCWebBrowserEx browser = this.ucWebBrowser.Browser; HtmlElement body = browser.Document.Body; this.treeView_Tags.Nodes.Clear(); this.treeView_Tags.Nodes.Add(this.analysisElement(body)); this.treeView_Tags.Nodes[0].Collapse(); List <int> positionList = new List <int>(); this.getElementPositionInDom(element, ref positionList); positionList.Reverse(); this.findNodeInTree(positionList); }
private void beforeNewWindow(WebBrowserExtendedNavigatingEventArgs e) { //cancel = true will block the popup window if (e.Url.ToLower() == "about:blank") { e.Cancel = false; return; } UCWebBrowserEx newWebBrowser = new UCWebBrowserEx(); newWebBrowser.BeforeNewWindow += new EventHandler <WebBrowserExtendedNavigatingEventArgs>(WebBrowser_BeforeNewWindow); newWebBrowser.ObjectForScripting = this; newWebBrowser.Url = new Uri(e.Url); newWebBrowser.Dock = DockStyle.Fill; TabPage newTabPage = new TabPage(Guid.NewGuid().ToString()); newTabPage.AutoScroll = true; newTabPage.Controls.Add(newWebBrowser); //newTabPage.Tag = newWebPage; this.tabControl_Browser.TabPages.Add(newTabPage); this.tabControl_Browser.SelectTab(newTabPage); }
public BrowserHistory(UCWebBrowserEx browserEx) { this._currentURLIndex = -1; this._hisrotyList = new List <string>(); this._ucWebBrowserEx = browserEx; }
public BrowserHistory(UCWebBrowserEx browserEx) { this._currentURLIndex = -1; this._hisrotyList = new List<string>(); this._ucWebBrowserEx = browserEx; }
private void beforeNewWindow(WebBrowserExtendedNavigatingEventArgs e) { //cancel = true will block the popup window if (e.Url.ToLower() == "about:blank") { e.Cancel = false; return; } UCWebBrowserEx newWebBrowser = new UCWebBrowserEx(); newWebBrowser.BeforeNewWindow += new EventHandler<WebBrowserExtendedNavigatingEventArgs>(WebBrowser_BeforeNewWindow); newWebBrowser.ObjectForScripting = this; newWebBrowser.Url = new Uri(e.Url); newWebBrowser.Dock = DockStyle.Fill; TabPage newTabPage = new TabPage(Guid.NewGuid().ToString()); newTabPage.AutoScroll = true; newTabPage.Controls.Add(newWebBrowser); //newTabPage.Tag = newWebPage; this.tabControl_Browser.TabPages.Add(newTabPage); this.tabControl_Browser.SelectTab(newTabPage); }
public WebBrowserExtendedEvents(UCWebBrowserEx browser) { _Browser = browser; }