private void CreateConfiguration(Dictionary<string, object> defaultValues, NameValueCollection nameValues)
        {
            foreach (KeyValuePair<string, object> pair in defaultValues)
                usedValues.Add(pair.Key, pair.Value.ToString());
            foreach (string key in nameValues.AllKeys)
            {
                string value = nameValues.Get(key);
                if (value != null)
                {
                    usedValues.Remove(key);
                    usedValues[key] = value;
                }
            }

            var allKeys = new BricksCollection<string>(nameValues.AllKeys);
            allKeys.AddRange(defaultValues.Keys);

            foreach (string key in allKeys)
            {
                string value = ConfigurationManager.AppSettings[key];
                if (value != null)
                {
                    usedValues.Remove(key);
                    usedValues[key] = value;
                }
            }
        }
Beispiel #2
0
        private void FindDescendantWindowElements(AutomationElementFinder windowFinder, Process process, BricksCollection <AutomationElement> windowElements)
        {
            List <AutomationElement> children =
                windowFinder.Children(AutomationSearchCondition.ByControlType(ControlType.Window).WithProcessId(process.Id));

            windowElements.AddRange(children);
            foreach (AutomationElement automationElement in children)
            {
                FindDescendantWindowElements(new AutomationElementFinder(automationElement), process, windowElements);
            }
        }
Beispiel #3
0
 private void FindDescendantWindowElements(AutomationElementFinder windowFinder, Process process, BricksCollection<AutomationElement> windowElements)
 {
     List<AutomationElement> children =
         windowFinder.Children(AutomationSearchCondition.ByControlType(ControlType.Window).WithProcessId(process.Id));
     windowElements.AddRange(children);
     foreach (AutomationElement automationElement in children)
         FindDescendantWindowElements(new AutomationElementFinder(automationElement), process, windowElements);
 }
Beispiel #4
0
 private DateFormat(params DateUnit[] unitsInOrder)
 {
     dateUnits.AddRange(unitsInOrder);
 }