Exemple #1
0
        protected virtual void OnTabMouseUp(TabMouseEventArgs e)
        {
            if (TabMouseUp != null)
            {
                TabMouseUp(this, e);
            }

            if (e.TabPage == clickClose)
            {
                Rectangle closerect = GetTabCloseRect(e.TabPage, e.TabBounds);
                if (closerect.Contains(e.Location))
                {
                    TabClosingEventArgs tcea = new TabClosingEventArgs(e.TabPage);
                    OnTabClosing(tcea);
                    if (!tcea.Cancel)
                    {
                        OnTabClosed(tcea);
                    }
                    return;
                }
            }

            Rectangle bounds = GetTabContentRect(e.TabPage, e.TabBounds);

            e.TabPage.CallTabMouseUp(new TabMouseEventArgs(e.Button, e.Clicks, e.X, e.Y, e.Delta, e.TabPage, Bounds));
        }
Exemple #2
0
 protected virtual void OnTabClosing(TabClosingEventArgs e)
 {
     if (TabClosing != null)
     {
         TabClosing(this, e);
     }
 }
Exemple #3
0
        protected virtual void OnTabClosing(TabClosingEventArgs e)
        {
            if (TabClosing != null)
            {
                TabClosing(this, e);
            }

            if (!e.Cancel)
            {
                e.TabPage.CallTabClosing(e);
            }
        }
Exemple #4
0
 internal void CallTabClosing(TabClosingEventArgs e)
 {
     OnTabClosing(e);
 }