Пример #1
0
 public static void FixTabName(UI.WindowsForms.Controls.UserControl uc, string Text)
 {
     if (uc.ParentForm is Atiran.CustomDocking.Docking.Desk.DeskTab)
     {
         if (uc.ParentForm != null)
         {
             uc.ParentForm.Text = Text;
         }
     }
     else
     {
         if (((UI.WindowsForms.UIElements.Form)uc.ParentForm) != null && ((UI.WindowsForms.UIElements.Form)uc.ParentForm).tabBar != null)
         {
             ((UI.WindowsForms.UIElements.Form)uc.ParentForm).tabBar.FixTabName(uc.UcGuid, Text);
         }
     }
 }
Пример #2
0
 public static void CloseUserControll(UI.WindowsForms.Controls.UserControl uc)
 {
     if (uc.ParentForm is Atiran.CustomDocking.Docking.Desk.DeskTab)
     {
         if (uc.ParentForm != null)
         {
             uc.ParentForm.Dispose();
             uc.Dispose();
         }
     }
     else
     {
         if (((UI.WindowsForms.UIElements.Form)uc.ParentForm) != null && ((UI.WindowsForms.UIElements.Form)uc.ParentForm).tabBar != null)
         {
             ((UI.WindowsForms.UIElements.Form)uc.ParentForm).tabBar.RemoveTab(uc.UcGuid);
         }
     }
 }