public MSAAUIItem(string className, string caption) { for (int searchCycleCount = 0; searchCycleCount < searchCycles; searchCycleCount++) { _me = MSAA.GetTopWindowAccessibleObject(className, caption); if (_me == null || _me == default(IAccessible)) { Thread.Sleep(searchDuration); } else { _propertySet = new MSAAPropertySet(_me); break; } } }
public MSAAUIItem(IAccessible parentAccObject, Regex name, bool ignoreInvisible) { for (int searchCycleCount = 0; searchCycleCount < searchCycles; searchCycleCount++) { _me = MSAA.GetObjectByName(parentAccObject, name, ignoreInvisible); _parent = parentAccObject; if (_me == null || _me == default(IAccessible)) { Thread.Sleep(searchDuration); } else { _propertySet = new MSAAPropertySet(_me); break; } } }
public MSAAUIItem(IAccessible accObject) { _me = accObject; _propertySet = new MSAAPropertySet(_me); }
public MSAAUIItem(IAccessible parentAccObject, Regex name, AccessibleUIItemType uiItemType, bool ignoreInvisible) { for (int searchCycleCount = 0; searchCycleCount < searchCycles; searchCycleCount++) { _me = MSAA.GetObjectByNameAndRole(parentAccObject, name, MSAARoles.GetRoleText(uiItemType), ignoreInvisible); _parent = parentAccObject; if (_me == null || _me == default(IAccessible)) { Thread.Sleep(searchDuration); } else { _propertySet = new MSAAPropertySet(_me); break; } } _propertySet = new MSAAPropertySet(_me); }