Пример #1
0
        /// <summary>
        /// This method is called when the BHO is instantiated and when
        /// it is destroyed. The site is an object implemented the
        /// interface InternetExplorer.
        /// </summary>
        /// <param name="site"></param>
        public void SetSite(Object site)
        {
            if (site != null)
            {
                this.ieInstance = (InternetExplorer)site;

                // Register the context menu handler.
                openImageDocHostUIHandler = new OpenMenuHandler(this.ieInstance);

                // Register the DocumentComplete event.
                ieInstance.DocumentComplete +=
                    new DWebBrowserEvents2_DocumentCompleteEventHandler(IeInstance_DocumentComplete);
            }
        }
Пример #2
0
        /// <summary>
        /// This method is called when the BHO is instantiated and when
        /// it is destroyed. The site is an object implemented the 
        /// interface InternetExplorer.
        /// </summary>
        /// <param name="site"></param>
        public void SetSite(Object site)
        {
            if (site != null)
            {
                this.ieInstance = (InternetExplorer) site;

                // Register the context menu handler.
                openImageDocHostUIHandler = new OpenMenuHandler(this.ieInstance);

                // Register the DocumentComplete event.
                ieInstance.DocumentComplete +=
                    new DWebBrowserEvents2_DocumentCompleteEventHandler(IeInstance_DocumentComplete);

            }
        }