Пример #1
0
 // this can be called multiple times in the lifetime of the control!!!
 void SelfHandleDestroyed(object s, EventArgs e)
 {
     _uiHandler = null;
 }
Пример #2
0
        void SelfHandleCreated(object s, EventArgs e)
        {
            HandleCreated -= new EventHandler(SelfHandleCreated);

            if (url == null)		url = String.Empty;
            if (html == null)	html = String.Empty;
            if (body == null)	body = String.Empty;

            if (body == String.Empty && html == String.Empty)
                url = "about:blank";

            _uiHandler = new DocHostUIHandler(this);

            // need to SetClientSite() to enable set properties in GetHostInfo() and setFlags():
            Interop.IOleObject oleObj = control as Interop.IOleObject;
            if (oleObj != null)
                oleObj.SetClientSite(_uiHandler);

            BrowserEvents2Multicaster bec = new BrowserEvents2Multicaster(this);

            Navigate(url);
        }