Ejemplo n.º 1
0
        protected void zOnTabPageClosing(TabControlExPageClosingEventArgs e)
        {
            EventHandler <TabControlExPageClosingEventArgs> evnt = TabPageClosing;

            if (evnt != null)
            {
                evnt(this, e);
            }
        }
Ejemplo n.º 2
0
 public void CloseTab(int tabIndex)
 {
     if (tabIndex > -1 && tabIndex < this.TabCount && zHasCloseButton(tabIndex))
     {
         TabControlExPageClosingEventArgs closingArgs = new TabControlExPageClosingEventArgs(tabIndex);
         zOnTabPageClosing(closingArgs);
         if (!closingArgs.Cancel)
         {
             TabPage page = this.TabPages[tabIndex];
             this.TabPages.Remove(page);
             page.Dispose();
         }
     }
 }