Exemplo n.º 1
0
 protected virtual void OnClosing(DocumentWindowEventArgs e)
 {
     if (this.Closing == null)
     {
         return;
     }
     this.Closing((object)this, e);
 }
Exemplo n.º 2
0
 protected virtual void OnClosed(DocumentWindowEventArgs e)
 {
     this.ViewContent.Closed();
     if (this.Closed == null)
     {
         return;
     }
     this.Closed((object)this, e);
 }
Exemplo n.º 3
0
        private void CloseWindowEvent(object sender, DocumentWindowEventArgs e)
        {
            DocumentWindow documentWindow = (DocumentWindow)sender;

            if (documentWindow.ViewContent == null)
            {
                return;
            }
            this.CloseContent(documentWindow.ViewContent);
        }
Exemplo n.º 4
0
        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);
        }