/// <summary> /// Init the tab page info. /// </summary> /// <param name="tabPage"></param> public static void InitTabPageInfo(TabPage tabPage) { TabPageInfo tabPageInfo = new TabPageInfo(); tabPageInfo.TabPage = tabPage; listOfTabPageInfo.Add(tabPageInfo); }
/// <summary> /// Delete the tab page info. /// </summary> /// <param name="tabPage"></param> public static bool RemoveTabPageInfo(TabPage tabPage) { //Locate the tab page info to remove. TabPageInfo tabInfoToDelelte = null; foreach (TabPageInfo tabPageInfo in listOfTabPageInfo) { if (tabPageInfo.TabPage == tabPage) { tabInfoToDelelte = tabPageInfo; break; } } return(listOfTabPageInfo.Remove(tabInfoToDelelte)); }