/// <summary>
        /// 获取保存在Page的Tag数据中的删除按钮
        /// </summary>
        /// <param name="tabPage"></param>
        /// <returns></returns>
        public static Control GetDelPageButByPageTag(TabPage tabPage)
        {
            Control retCon = null;

            if (tabPage != null)
            {
                Dictionary <string, object> tag = ControlsUtils.GetControlTagToDic(tabPage);
                if (tag != null && tag.ContainsKey(EnumUtils.GetDescription(DefaultNameEnum.DEF_BUTTON_TAG_KEY)))
                {
                    retCon = (Control)tag[EnumUtils.GetDescription(DefaultNameEnum.DEF_BUTTON_TAG_KEY)];
                }
            }
            return(retCon);
        }
 /// <summary>
 /// 移除TabPage
 /// </summary>
 /// <param name="tabPage"></param>
 public static void DeleteTabPage(TabControl tab, TabPage tabPage)
 {
     if (tabPage != null && tab != null)
     {
         if (tab.TabCount > 1)
         {
             int selIndex = tab.SelectedIndex;
             int delIndex = GetTabIndex(tab, tabPage);
             tab.TabPages.Remove(tabPage);
             // 移除page标签所带有的删除按钮
             Dictionary <string, object> tag = ControlsUtils.GetControlTagToDic(tabPage);
             if (tag != null && tag.ContainsKey(EnumUtils.GetDescription(DefaultNameEnum.DEF_BUTTON_TAG_KEY)))
             {
                 Control con = (Control)tag[EnumUtils.GetDescription(DefaultNameEnum.DEF_BUTTON_TAG_KEY)];
                 if (con != null && !con.IsDisposed)
                 {
                     con.Dispose();
                 }
             }
         }
     }
 }