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); }
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; } } }
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); }
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); }