コード例 #1
0
 protected virtual void OnClosing(DocumentWindowEventArgs e)
 {
     if (this.Closing == null)
     {
         return;
     }
     this.Closing((object)this, e);
 }
コード例 #2
0
 protected virtual void OnClosed(DocumentWindowEventArgs e)
 {
     this.ViewContent.Closed();
     if (this.Closed == null)
     {
         return;
     }
     this.Closed((object)this, e);
 }
コード例 #3
0
ファイル: MainWindow.cs プロジェクト: yuluos/CocoStudio2.0.6
        private void CloseWindowEvent(object sender, DocumentWindowEventArgs e)
        {
            DocumentWindow documentWindow = (DocumentWindow)sender;

            if (documentWindow.ViewContent == null)
            {
                return;
            }
            this.CloseContent(documentWindow.ViewContent);
        }
コード例 #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);
        }