protected virtual void OnClosing(DocumentWindowEventArgs e) { if (this.Closing == null) { return; } this.Closing((object)this, e); }
protected virtual void OnClosed(DocumentWindowEventArgs e) { this.ViewContent.Closed(); if (this.Closed == null) { return; } this.Closed((object)this, e); }
private void CloseWindowEvent(object sender, DocumentWindowEventArgs e) { DocumentWindow documentWindow = (DocumentWindow)sender; if (documentWindow.ViewContent == null) { return; } this.CloseContent(documentWindow.ViewContent); }
public bool CloseWindow(bool force, bool animate) { bool wasActive = this.workbench.ActiveWorkbenchWindow == this; DocumentWindowEventArgs e = new DocumentWindowEventArgs(force, wasActive); e.Cancel = false; this.OnClosing(e); if (e.Cancel) { return(false); } this.workbench.RemoveTab(this.tabControl, this.tab.Index, animate); this.OnClosed(e); this.box.Remove(this.content.Control); this.Destroy(); return(true); }