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));
 }
예제 #2
0
 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));
 }
예제 #4
0
 //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;
   }
 }
예제 #8
0
 // 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.
 }
예제 #9
0
 protected override void DetachSink()
 {
     if (null != cookie)
     {
         cookie.Disconnect();
         cookie = null;
     }
 }
예제 #10
0
 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) {
     }
 }
예제 #11
0
 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) {
     }
 }
예제 #12
0
 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) {
     }
 }
예제 #13
0
 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) {
     }
 }
예제 #14
0
 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) {
     }
 }
예제 #15
0
 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) {
     }
 }
예제 #16
0
 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) {
     }
 }
예제 #18
0
 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();
 }
예제 #20
0
 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 ) {
     }
 }
예제 #21
0
 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)
     {
     }
 }
예제 #22
0
 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 ) {
     }
 }
예제 #23
0
 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 ) {
     }
 }
예제 #24
0
파일: Class1.cs 프로젝트: rojac07/COM
 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 )
     {
     }
 }
예제 #25
0
 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 ) {
     }
 }
예제 #26
0
 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();
 }
예제 #28
0
 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 ) {
     }
 }
예제 #30
0
파일: EXWebBrowser.cs 프로젝트: windygu/CRM
 protected override void CreateSink()
 {
     base.CreateSink();
     events = new WebBrowserExtendedEvents(this);
     cookie = new System.Windows.Forms.AxHost.ConnectionPointCookie(this.ActiveXInstance, events, typeof(DWebBrowserEvents2));
 }