Пример #1
0
        private void webBrowserTop_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            int _h = webBrowserTop.Document.Body.ScrollRectangle.Height;

            webBrowserTop.Height = _h;

            m_topBrowserContextMenuHandler = new WebBrowserContextMenuHandler(webBrowserTop, miCopyTop);
            contextMenuStripTop.Opening   += contextMenuStripTop_Opening;
            miCopyTop.Click += m_topBrowserContextMenuHandler.CopyCtxMenuClickHandler;
            webBrowserTop.Document.ContextMenuShowing += webBrowserTop_ContextMenuShowing;
        }
Пример #2
0
        private void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            if (!m_addedLinkClickEventHandler)
            {
                m_addedLinkClickEventHandler = true;

                for (int i = 0; i < webBrowser.Document.Links.Count; i++)
                {
                    webBrowser.Document.Links[i].Click += LinkClick;
                }
            }

            m_soulBrowserContextMenuHandler = new WebBrowserContextMenuHandler(webBrowser, miCopySoul);
            contextMenuStrip.Opening       += contextMenuStrip_Opening;
            miCopySoul.Click += m_soulBrowserContextMenuHandler.CopyCtxMenuClickHandler;
            webBrowser.Document.ContextMenuShowing += webBrowser_ContextMenuShowing;
        }