public void OnPageClose(DockPage page) { if (page.Widget is IDockContent) { if (!((IDockContent)page.Widget).Closing()) { return; } } PageClose?.Invoke(this, new DockPageEventArgs(page)); if (page.HideOnClose) { page.Visible = false; } else { Items.Remove(page); page.Widget.Dispose(); } }
private void ExtandedWebBrowser1_Quit(object sender, EventArgs e) { isAppExit = true; PageClose?.Invoke(this, EventArgs.Empty); }