uTools-quickcommand/automation.cs
2025-01-15 01:33:28 +08:00

10 lines
545 B
C#

// 如果指定了过滤条件,创建一个组合条件
if (!string.IsNullOrEmpty(filter))
{
searchCondition = new OrCondition(
new PropertyCondition(AutomationElement.NameProperty, filter, PropertyConditionFlags.IgnoreCase),
new PropertyCondition(AutomationElement.ClassNameProperty, filter, PropertyConditionFlags.IgnoreCase),
new PropertyCondition(AutomationElement.AutomationIdProperty, filter, PropertyConditionFlags.IgnoreCase)
);
}