protected override void CreateSink() { // Make sure to call the base class or the normal events won't fire base.CreateSink(); _events = new DWebBrowserEvents2Class(this); _cookie = new AxHost.ConnectionPointCookie(this.ActiveXInstance, _events, typeof(DWebBrowserEvents2)); }
protected override void CreateSink() { // Make sure to call the base class or the normal events won't fire base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(UnsafeNativeMethods.DWebBrowserEvents2)); }
protected override void CreateSink() { // Make sure to call the base class or the normal events won't fire base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(UnsafeNativeMethods.DWebBrowserEvents2)); }
//This method will be called to give you a chance to create your own event sink protected override void CreateSink() { //MAKE SURE TO CALL THE BASE or the normal events won 't fire base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(DWebBrowserEvents2)); }
//This method will be called to give you a chance to create your own event sink protected override void CreateSink() { //MAKE SURE TO CALL THE BASE or the normal events won't fire base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(DWebBrowserEvents2)); }
protected override void DetachSink() { if (_cookie != null) { _cookie.Disconnect(); _cookie = null; } }
protected override void DetachSink() { if (null != cookie) { cookie.Disconnect(); cookie = null; } }
// register script errors handler on DOM - document.window private void RegisterWindowErrorHanlder_() { object parwin = ((dynamic)m_innerBrowser.Document).parentWindow; var cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(parwin, new HtmlWindowEvents2Impl(this), typeof(IIntHTMLWindowEvents2)); // MemoryLEAK? No: cookie has a Finalize() to Disconnect istelf. We'll rely on that. If disconnected too early, // though (eg. in LoadCompleted-event) scripts continue to run and can cause error messages to appear again. // --> forget cookie and be happy. }
protected override void DetachSink() { if (null != cookie) { cookie.Disconnect(); cookie = null; } }
protected override void CreateSink() { try { this.eventMulticaster = new AxPrintControlEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(PRINTCONTROLLib._DPrintControlEvents)); } catch (System.Exception) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxVisMergeEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(DIFFMERGECTLLib._DVisMergeEvents)); } catch (System.Exception) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxMicrImageEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MTMicrImage.@__MicrImage)); } catch (System.Exception) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxAcroPDFEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(AcroPDFLib._IAcroPDFEvents)); } catch (System.Exception) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxHxIndexCtrlEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxIndexViewEvents)); } catch (System.Exception) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxLameColorControlEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(SimpleVb6AxCtrl.__LameColorControl)); } catch (System.Exception) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxFramerControlEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(DSOFramer._DFramerCtlEvents)); } catch (System.Exception) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxShockwaveFlashEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(Interop.ShockwaveFlashObjects._IShockwaveFlashEvents)); } catch (System.Exception) { } }
protected override void DetachSink() { if (null != cookie) { cookie.Disconnect(); cookie = null; } //从基础 ActiveX 控件中释放附加在 System.Windows.Forms.WebBrowser.CreateSink() 方法中的事件处理客户端。 base.DetachSink(); }
protected override void DetachSink() { if (null != cookie) { cookie.Disconnect(); cookie = null; } //从基础 ActiveX 控件中释放附加在 System.Windows.Forms.WebBrowser.CreateSink() 方法中的事件处理客户端。 base.DetachSink(); }
protected override void CreateSink() { try { this.eventMulticaster = new AxMicrImageEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MTMicrImage.@__MicrImage)); } catch (System.Exception ) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxWebBrowserEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(SHDocVw.DWebBrowserEvents2)); } catch (System.Exception) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxWindowsMediaPlayerEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(WMPLib._WMPOCXEvents)); } catch (System.Exception ) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxVLCPluginEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(AXVLC.DVLCEvents)); } catch (System.Exception ) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxLameColorControlEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(SimpleVb6AxCtrl.__LameColorControl)); } catch (System.Exception ) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxHxIndexCtrlEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSHelpControls.IHxIndexViewEvents)); } catch (System.Exception ) { } }
protected override void CreateSink() { base.CreateSink();//还是需要源 events = new NewWebBrowserEvent(this); cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(INewDWWebBrowserEvent)); }
protected override void DetachSink() { if (null != _cookie) { _cookie.Disconnect(); _cookie = null; } base.DetachSink(); }
protected override void CreateSink() { try { this.eventMulticaster = new AxMsRdpClient6EventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(MSTSCLib.IMsTscAxEvents)); } catch (System.Exception ) { } }
protected override void CreateSink() { try { this.eventMulticaster = new AxShockwaveFlashEventMulticaster(this); this.cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ocx, this.eventMulticaster, typeof(ShockwaveFlashObjects._IShockwaveFlashEvents)); } catch (System.Exception ) { } }
protected override void CreateSink() { base.CreateSink(); events = new WebBrowserExtendedEvents(this); cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(DWebBrowserEvents2)); }