Esempio n. 1
0
 internal override void OnDispose(IntPtr nativePtr)
 {
     if (m_OnBeforePopup != null)
     {
         m_OnBeforePopup = null;
         CfxApi.LifeSpanHandler.cfx_life_span_handler_set_callback(NativePtr, 0, IntPtr.Zero);
     }
     if (m_OnAfterCreated != null)
     {
         m_OnAfterCreated = null;
         CfxApi.LifeSpanHandler.cfx_life_span_handler_set_callback(NativePtr, 1, IntPtr.Zero);
     }
     if (m_DoClose != null)
     {
         m_DoClose = null;
         CfxApi.LifeSpanHandler.cfx_life_span_handler_set_callback(NativePtr, 2, IntPtr.Zero);
     }
     if (m_OnBeforeClose != null)
     {
         m_OnBeforeClose = null;
         CfxApi.LifeSpanHandler.cfx_life_span_handler_set_callback(NativePtr, 3, IntPtr.Zero);
     }
     base.OnDispose(nativePtr);
 }
Esempio n. 2
0
 internal override void OnDispose(IntPtr nativePtr)
 {
     if(m_OnBeforePopup != null) {
         m_OnBeforePopup = null;
         CfxApi.cfx_life_span_handler_set_managed_callback(NativePtr, 0, IntPtr.Zero);
     }
     if(m_OnAfterCreated != null) {
         m_OnAfterCreated = null;
         CfxApi.cfx_life_span_handler_set_managed_callback(NativePtr, 1, IntPtr.Zero);
     }
     if(m_RunModal != null) {
         m_RunModal = null;
         CfxApi.cfx_life_span_handler_set_managed_callback(NativePtr, 2, IntPtr.Zero);
     }
     if(m_DoClose != null) {
         m_DoClose = null;
         CfxApi.cfx_life_span_handler_set_managed_callback(NativePtr, 3, IntPtr.Zero);
     }
     if(m_OnBeforeClose != null) {
         m_OnBeforeClose = null;
         CfxApi.cfx_life_span_handler_set_managed_callback(NativePtr, 4, IntPtr.Zero);
     }
     base.OnDispose(nativePtr);
 }
Esempio n. 3
0
 /// <summary>
 /// 浏览器生命周期事件处理类
 /// </summary>
 /// <param name="client">浏览器客户端事件处理对象</param>
 internal LifeSpanHandler(BrowserClient client)
 {
     _currentClient  = client;
     OnAfterCreated += new CfxOnAfterCreatedEventHandler(LifeSpanHandler_OnAfterCreated);
     OnBeforePopup  += new CfxOnBeforePopupEventHandler(LifeSpanHandler_OnBeforePopup);
 }