コード例 #1
0
        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);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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);
        }
コード例 #7
0
        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);
        }
コード例 #8
0
ファイル: UtilClass.cs プロジェクト: newsike/Buffalo-Famework
 public BrowserHistory(UCWebBrowserEx browserEx)
 {
     this._currentURLIndex = -1;
     this._hisrotyList     = new List <string>();
     this._ucWebBrowserEx  = browserEx;
 }
コード例 #9
0
ファイル: UtilClass.cs プロジェクト: newsike/Buffalo-Famework
 public BrowserHistory(UCWebBrowserEx browserEx)
 {
     this._currentURLIndex = -1;
     this._hisrotyList = new List<string>();
     this._ucWebBrowserEx = browserEx;
 }
コード例 #10
0
        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);
        }
コード例 #11
0
 public WebBrowserExtendedEvents(UCWebBrowserEx browser)
 {
     _Browser = browser;
 }
コード例 #12
0
 public WebBrowserExtendedEvents(UCWebBrowserEx browser)
 {
     _Browser = browser;
 }