//验证控件值 public static bool Validate(XtraTabPage tabPage) { if (tabPage == null) { return(false); } List <Control> childrens = TmoComm.GetChildrenControl(tabPage, true); foreach (Control children in childrens) { if (children is UCQuestion) { UCQuestion ucq = (UCQuestion)children; if (ucq.Enabled && !ucq.ValidateValue()) { //ucq._valueControls.ForEach(x => x.Focus()); ucq.Focus(); tabPage.Select(); return(false); } } } return(true); }