Beispiel #1
0
 /// <summary>
 /// Raises event 'BeforeClose'
 /// </summary>
 protected virtual void OnBeforeClose()
 {
     if (BeforeClose != null)
     {
         BeforeClose.Invoke(this, System.EventArgs.Empty);
     }
 }
 private void FireBeforeClose()
 {
     try
     {
         BeforeClose?.Invoke(this, EventArgs.Empty);
     }
     catch (Exception)
     {
     }
 }
        /// <summary>
        /// The on before close.
        /// </summary>
        public void OnBeforeClose()
        {
            BeforeClose?.Invoke(this, null);

            // Flush cache
            // This is needed since there is some delay from when a cookie
            // has been set/deleted before it is actually persisted to disk.
            // This ensures all cookies is written to disk before exit.
            var cookieManager = CefCookieManager.GetGlobal(null);

            cookieManager?.FlushStore(null);
        }
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            // Release managed objects
            if (disposing)
            {
                BeforeClose?.Invoke(null, null);
                _socket?.Dispose();
            }

            // Set big fields to NULL here:
            _disposed = true;
        }
Beispiel #5
0
 internal protected virtual void OnBeforeClose()
 {
     m_browserWindowHandle = IntPtr.Zero;
     BeforeClose?.Invoke(this, EventArgs.Empty);
 }
Beispiel #6
0
 /// <summary>
 /// The on before close.
 /// </summary>
 /// <param name="eventArgs">
 /// The event args.
 /// </param>
 public void OnBeforeClose(BeforeCloseEventArgs eventArgs)
 {
     BeforeClose?.Invoke(this, eventArgs);
 }
Beispiel #7
0
 private void OnBeforeClose(object sender, NavigateEventArgs e)
 {
     BeforeClose?.Invoke(sender, e);
 }
Beispiel #8
0
 /// <summary>
 /// The on before close.
 /// </summary>
 public void OnBeforeClose()
 {
     BeforeClose?.Invoke(this, null);
 }
 protected virtual void OnBeforeClose(object sender, NavigateEventArgs e)
 {
     BeforeClose?.Invoke(sender, e);
 }
Beispiel #10
0
 protected void DoBeforeClose()
 {
     State = DatabaseState.Closing;
     BeforeClose?.Invoke(this, new EventArgs());
 }
Beispiel #11
0
 internal protected virtual void OnBeforeClose()
 {
     BeforeClose?.Invoke(this, EventArgs.Empty);
 }