public static void RemoveTabPage(BaseUserControl myForm) //移除
 {
     if (myForm.Parent != null && myForm.Parent is Form)  //父容器是窗体
     {
         ((Form)myForm.Parent).Close();
     }
     else
     {
         Program.TabcMain.TabPages.Remove(Program.TabcMain.SelectedTabPage);
         Program.TabcMain.SelectedTabPageIndex = Program.TabcMain.TabPages.Count - 1;
     }
 }
 public static void Add_TabPage(string str, BaseUserControl myForm) //将标题添加进tabpage中
 {
     if (!tabControlCheckHave(Program.TabcMain, str))
     {
         MyXtraTabPage page = new MyXtraTabPage();
         myForm.BorderStyle = BorderStyle.None;
         myForm.Parent      = Program.TabcMain.SelectedTabPage;
         myForm.Dock        = DockStyle.Fill;
         page.Text          = str;
         page.Controls.Add(myForm);
         Program.TabcMain.TabPages.Add(page);
         Program.TabcMain.SelectedTabPageIndex = ValueConvert.ToInt32(Program.TabcMain.TabPages.Count - 1);
     }
 }