internal bool IsStepActive(WizardStep step, IUiEltCollection elements) { bool result = false; if (null == step) { return(result); } if (null == step.SearchCriteria || 0 == step.SearchCriteria.Count()) { return(result); } var searchCriteria = step.SearchCriteria.Where(hashtable => null != hashtable); if (null == searchCriteria || 0 == searchCriteria.Count()) { return(result); } if (null == elements || 0 == elements.Count) { return(result); } if (searchCriteria.All(criterion => elements.ToArray().Any(elt => ControlSearcher.TestControlWithAllSearchCriteria(new Hashtable[] { criterion }, elt)) )) { result = true; } return(result); }
internal static List <IUiElement> SearchByExactConditionsViaUia( IUiElement inputObject, Hashtable[] searchCriteria, classic.Condition conditions) { if (conditions == null) { return(new List <IUiElement>()); } if (inputObject == null || (int)inputObject.GetCurrent().ProcessId <= 0) { return(new List <IUiElement>()); } IUiEltCollection tempCollection = inputObject.FindAll(classic.TreeScope.Descendants, conditions); if (null == searchCriteria || 0 == searchCriteria.Length) { return(tempCollection.ToArray().ToList <IUiElement>()); } return(tempCollection.ToArray().Where(element => TestControlWithAllSearchCriteria(searchCriteria, element)).ToList <IUiElement>()); }
internal bool IsStepActive(WizardStep step, IUiEltCollection elements) { bool result = false; if (null == step) return result; if (null == step.SearchCriteria || 0 == step.SearchCriteria.Count()) return result; var searchCriteria = step.SearchCriteria.Where(hashtable => null != hashtable); if (null == searchCriteria || 0 == searchCriteria.Count()) return result; if (null == elements || 0 == elements.Count) return result; if (searchCriteria.All(criterion => elements.ToArray().Any(elt => ControlSearcher.TestControlWithAllSearchCriteria(new Hashtable[] { criterion }, elt)) )) { result = true; } return result; }