using System.ComponentModel; namespace System.Windows.Forms { public class TabControlCancelEventArgs : CancelEventArgs { public TabPage TabPage { get; } public int TabPageIndex { get; } public TabControlAction Action { get; } public TabControlCancelEventArgs(TabPage tabPage, int tabPageIndex, bool cancel, TabControlAction action) : base(cancel) { TabPage = tabPage; TabPageIndex = tabPageIndex; Action = action; } } public delegate void TabControlCancelEventHandler(object sender, TabControlCancelEventArgs e); }