本文整理汇总了C#中UIAutomationClient类的典型用法代码示例。如果您正苦于以下问题:C# UIAutomationClient类的具体用法?C# UIAutomationClient怎么用?C# UIAutomationClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIAutomationClient类属于命名空间,在下文中一共展示了UIAutomationClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TextPatternRange
internal TextPatternRange(UIAutomationClient.IUIAutomationTextRange range, TextPattern pattern)
{
Debug.Assert(range != null);
Debug.Assert(pattern != null);
this._range = range;
this._pattern = pattern;
}
示例2: AutomationFocusChangedEventArgs
void UIAutomationClient.IUIAutomationFocusChangedEventHandler.HandleFocusChangedEvent(
UIAutomationClient.IUIAutomationElement sender)
{
// Can't set the arguments -- they come from a WinEvent handler.
AutomationFocusChangedEventArgs args = new AutomationFocusChangedEventArgs(0, 0);
_focusHandler(AutomationElement.Wrap(sender), args);
}
示例3: Wrap
internal static TextPatternRange Wrap(UIAutomationClient.IUIAutomationTextRange range, TextPattern pattern)
{
Debug.Assert(pattern != null);
if (range == null)
{
return null;
}
else
{
return new TextPatternRange(range, pattern);
}
}
示例4: AutomationEventArgs
void UIAutomationClient.IUIAutomationEventHandler.HandleAutomationEvent(
UIAutomationClient.IUIAutomationElement sender, int eventId)
{
AutomationEventArgs args;
if (eventId != WindowPatternIdentifiers.WindowClosedEvent.Id)
{
args = new AutomationEventArgs(AutomationEvent.LookupById(eventId));
}
else
{
args = new WindowClosedEventArgs((int[])sender.GetRuntimeId());
}
_basicHandler(AutomationElement.Wrap(sender), args);
}
示例5: Wrap
internal static Condition Wrap(UIAutomationClient.IUIAutomationCondition obj)
{
if (obj is UIAutomationClient.IUIAutomationBoolCondition)
return new BoolCondition((UIAutomationClient.IUIAutomationBoolCondition)obj);
else if (obj is UIAutomationClient.IUIAutomationAndCondition)
return new AndCondition((UIAutomationClient.IUIAutomationAndCondition)obj);
else if (obj is UIAutomationClient.IUIAutomationOrCondition)
return new OrCondition((UIAutomationClient.IUIAutomationOrCondition)obj);
else if (obj is UIAutomationClient.IUIAutomationNotCondition)
return new NotCondition((UIAutomationClient.IUIAutomationNotCondition)obj);
else if (obj is UIAutomationClient.IUIAutomationPropertyCondition)
return new PropertyCondition((UIAutomationClient.IUIAutomationPropertyCondition)obj);
else
throw new ArgumentException("obj");
}
示例6: ConvertToElementArray
internal static AutomationElement[] ConvertToElementArray(UIAutomationClient.IUIAutomationElementArray array)
{
AutomationElement[] elementArray;
if (array != null)
{
elementArray = new AutomationElement[array.Length];
for (int i = 0; i < array.Length; i++)
{
elementArray[i] = AutomationElement.Wrap(array.GetElement(i));
}
}
else
{
elementArray = null;
}
return elementArray;
}
示例7: TextPattern2
private TextPattern2(AutomationElement el, UIAutomationClient.IUIAutomationTextPattern2 pattern, UIAutomationClient.IUIAutomationTextPattern basePattern, bool cached)
: base(el, basePattern, cached)
{
Debug.Assert(pattern != null);
this._pattern = pattern;
}
示例8: Wrap
internal static AutomationElementCollection Wrap(UIAutomationClient.IUIAutomationElementArray obj)
{
return (obj == null) ? null : new AutomationElementCollection(obj);
}
示例9: AutomationElementCollectionEnumerator
internal AutomationElementCollectionEnumerator(UIAutomationClient.IUIAutomationElementArray obj)
{
Debug.Assert(obj != null);
this._obj = obj;
this._cElem = obj.Length;
}
示例10: AutomationElement
internal AutomationElement(UIAutomationClient.IUIAutomationElement obj)
{
Debug.Assert(obj != null);
this._obj = obj;
}
示例11: AutomationElementCollection
internal AutomationElementCollection(UIAutomationClient.IUIAutomationElementArray obj)
{
Debug.Assert(obj != null);
this._obj = obj;
}
示例12: DockPattern
private DockPattern(AutomationElement el, UIAutomationClient.IUIAutomationDockPattern pattern, bool cached)
: base(el, cached)
{
Debug.Assert(pattern != null);
this._pattern = pattern;
}
示例13: VirtualizedItemPattern
private VirtualizedItemPattern(AutomationElement el, UIAutomationClient.IUIAutomationVirtualizedItemPattern pattern, bool cached)
: base(el, cached)
{
Debug.Assert(pattern != null);
this._pattern = pattern;
}
示例14: ConvertToRect
internal static System.Windows.Rect ConvertToRect(UIAutomationClient.tagRECT rc)
{
return new System.Windows.Rect(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top);
}
示例15: TablePattern
private TablePattern(AutomationElement el, UIAutomationClient.IUIAutomationTablePattern tablePattern, UIAutomationClient.IUIAutomationGridPattern gridPattern, bool cached)
: base(el, gridPattern, cached)
{
Debug.Assert(tablePattern != null);
this._pattern = tablePattern;
}