Ejemplo n.º 1
0
 public object GetChildForm(Guid FormId)
 {
     foreach (XtraMdiTabPage xt in frmMdiManager.Pages)
     {
         IChildGuidForm instance = xt.MdiChild as IChildGuidForm;
         if (instance == null)
         {
             continue;
         }
         if (instance.FormId == FormId)
         {
             return(xt.MdiChild);
         }
     }
     return(null);
 }
Ejemplo n.º 2
0
 public void CloseTabPage(Guid FormId)
 {
     foreach (BaseDocument xt in tbbdvwContent.Documents)
     {
         IChildGuidForm instance = xt.Control as IChildGuidForm;
         if (instance == null)
         {
             continue;
         }
         if (instance.FormId == FormId)
         {
             tbbdvwContent.Controller.Close(xt);
             break;
         }
     }
 }
Ejemplo n.º 3
0
 public bool ShowChildForm(Guid FormId, params object[] obj)
 {
     foreach (BaseDocument xt in tbbdvwContent.Documents)
     {
         IChildGuidForm instance = xt.Control as IChildGuidForm;
         if (instance == null)
         {
             continue;
         }
         if (instance.FormId == FormId)
         {
             bool exist = false;
             if (instance.Parameter != null && obj != null && instance.Parameter.Length == obj.Length)
             {
                 int i = 0;
                 for (i = 0; i < instance.Parameter.Length; i++)
                 {
                     exist = true;
                     if (!Object.Equals(instance.Parameter[i], obj[i]))
                     {
                         exist = false;
                         break;
                     }
                 }
             }
             if (instance.Parameter == null && obj == null)
             {
                 exist = true;
             }
             if (exist)
             {
                 instance.LoadParameter(obj);
                 tbbdvwContent.ActivateDocument(xt.Control);
                 return(exist);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 4
0
 public object GetChildForm(Guid FormId, params Object[] arg)
 {
     foreach (BaseDocument xt in tbbdvwContent.Documents)
     {
         IChildGuidForm instance = xt.Control as IChildGuidForm;
         if (instance == null)
         {
             continue;
         }
         if (instance.FormId == FormId)
         {
             bool exist = false;
             if (instance.Parameter != null && arg != null && instance.Parameter.Length == arg.Length)
             {
                 int i = 0;
                 for (i = 0; i < instance.Parameter.Length; i++)
                 {
                     exist = true;
                     if (!Object.Equals(instance.Parameter[i], arg[i]))
                     {
                         exist = false;
                         break;
                     }
                 }
             }
             if (instance.Parameter == null && arg == null)
             {
                 exist = true;
             }
             if (exist)
             {
                 return(xt.Control);
             }
         }
     }
     return(null);
 }