private void bar4_DockTabClosing(object sender, DockTabClosingEventArgs e)
 {
     foreach (object b in e.DockContainerItem.Control.Controls)
     {
         if (b is Scintilla)
         {
             Scintilla saveme = (Scintilla)b;
             save(saveme.Text, saveme.Tag.ToString());
         }
     }
 }
Esempio n. 2
0
 internal void InvokeDockTabClosing(DockTabClosingEventArgs e)
 {
     if (DockTabClosing != null)
         DockTabClosing(this, e);
     if (this.Owner is DotNetBarManager)
     {
         ((DotNetBarManager)this.Owner).InvokeDockTabClosing(this, e);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Closes the DockContainerItem.
        /// </summary>
        /// <param name="dockTab">DockContainerItem to close.</param>
        /// <param name="source">Source of the event.</param>
        public void CloseDockTab(DockContainerItem dockTab, eEventSource source)
        {
            DockTabClosingEventArgs e = new DockTabClosingEventArgs(dockTab, source);
            InvokeDockTabClosing(e);
            if (e.Cancel)
                return;

            if (this.VisibleItemCount > 1)
            {
                if (e.RemoveDockTab)
                    this.Items.Remove(dockTab);
                else
                    BarUtilities.SetDockContainerVisible(dockTab, false);
            }
            else
            {
                if (e.RemoveDockTab)
                    this.Items.Remove(dockTab);
                CloseBar();
                if (!this.Visible)
                    dockTab.Visible = false;
            }

            InvokeDockTabClosed(e);
        }
Esempio n. 4
0
 private void InvokeDockTabClosed(DockTabClosingEventArgs e)
 {
     if (DockTabClosed != null)
         DockTabClosed(this, e);
     if (this.Owner is DotNetBarManager)
     {
         ((DotNetBarManager)this.Owner).InvokeDockTabClosed(this, e);
     }
     OnBarStateChanged(new BarStateChangedEventArgs(this, eBarStateChange.DockTabClosed, e.DockContainerItem));
 }
Esempio n. 5
0
 internal void InvokeDockTabClosed(Bar bar, DockTabClosingEventArgs e)
 {
     if (DockTabClosed != null)
         DockTabClosed(this, e);
 }