Пример #1
0
 internal TextPatternRange(UIAutomationClient.IUIAutomationTextRange range, TextPattern pattern)
 {
     Debug.Assert(range != null);
     Debug.Assert(pattern != null);
     this._range = range;
     this._pattern = pattern;
 }
Пример #2
0
 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
0
 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
0
 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
0
 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
0
 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
0
 private TextPattern2(AutomationElement el, UIAutomationClient.IUIAutomationTextPattern2 pattern, UIAutomationClient.IUIAutomationTextPattern basePattern, bool cached)
     : base(el, basePattern, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
 internal static AutomationElementCollection Wrap(UIAutomationClient.IUIAutomationElementArray obj)
 {
     return (obj == null) ? null : new AutomationElementCollection(obj);
 }
 internal AutomationElementCollectionEnumerator(UIAutomationClient.IUIAutomationElementArray obj)
 {
     Debug.Assert(obj != null);
     this._obj = obj;
     this._cElem = obj.Length;
 }
Пример #10
0
 internal AutomationElement(UIAutomationClient.IUIAutomationElement obj)
 {
     Debug.Assert(obj != null);
     this._obj = obj;
 }
 internal AutomationElementCollection(UIAutomationClient.IUIAutomationElementArray obj)
 {
     Debug.Assert(obj != null);
     this._obj = obj;
 }
Пример #12
0
 private DockPattern(AutomationElement el, UIAutomationClient.IUIAutomationDockPattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
Пример #13
0
 private VirtualizedItemPattern(AutomationElement el, UIAutomationClient.IUIAutomationVirtualizedItemPattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
Пример #14
0
 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
0
 private TablePattern(AutomationElement el, UIAutomationClient.IUIAutomationTablePattern tablePattern, UIAutomationClient.IUIAutomationGridPattern gridPattern, bool cached)
     : base(el, gridPattern, cached)
 {
     Debug.Assert(tablePattern != null);
     this._pattern = tablePattern;
 }
Пример #16
0
 internal static TextPatternRange[] Wrap(UIAutomationClient.IUIAutomationTextRangeArray ranges, TextPattern pattern)
 {
     if (ranges == null)
     {
         return null;
     }
     TextPatternRange[] rangeArray = new TextPatternRange[ranges.Length];
     for (int i = 0; i < ranges.Length; i++)
     {
         rangeArray[i] = new TextPatternRange(ranges.GetElement(i), pattern);
     }
     return rangeArray;
 }
Пример #17
0
 void UIAutomationClient.IUIAutomationPropertyChangedEventHandler.HandlePropertyChangedEvent(
     UIAutomationClient.IUIAutomationElement sender, 
     int propertyId, 
     object newValue)
 {
     AutomationProperty property = AutomationProperty.LookupById(propertyId);
     object wrappedObj = Utility.WrapObjectAsProperty(property, newValue);
     AutomationPropertyChangedEventArgs args = new AutomationPropertyChangedEventArgs(
         property,
         null,
         wrappedObj);
     this._propChangeHandler(AutomationElement.Wrap(sender), args);
 }
Пример #18
0
 internal TreeWalker(UIAutomationClient.IUIAutomationTreeWalker obj)
 {
     Debug.Assert(obj != null);
     _obj = obj;
 }
Пример #19
0
 private SpreadsheetItemPattern(AutomationElement el, UIAutomationClient.IUIAutomationSpreadsheetItemPattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
Пример #20
0
 internal AndCondition(UIAutomationClient.IUIAutomationAndCondition obj)
 {
     Debug.Assert(obj != null);
     this._obj = obj;
 }
Пример #21
0
 protected TextPattern(AutomationElement el, UIAutomationClient.IUIAutomationTextPattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
 private LegacyIAccessiblePattern(AutomationElement el, UIAutomationClient.IUIAutomationLegacyIAccessiblePattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
Пример #23
0
 private SynchronizedInputPattern(AutomationElement el, UIAutomationClient.IUIAutomationSynchronizedInputPattern pattern, bool cached)
     : base(el, cached)
 {
     Debug.Assert(pattern != null);
     this._pattern = pattern;
 }
Пример #24
0
 internal static AutomationElement Wrap(UIAutomationClient.IUIAutomationElement obj)
 {
     return (obj == null) ? null : new AutomationElement(obj);
 }
Пример #25
0
 void UIAutomationClient.IUIAutomationStructureChangedEventHandler.HandleStructureChangedEvent(UIAutomationClient.IUIAutomationElement sender, UIAutomationClient.StructureChangeType changeType, Array runtimeId)
 {
     StructureChangedEventArgs args = new StructureChangedEventArgs(
         (StructureChangeType)changeType,
         (int[])runtimeId);
     this._structureChangeHandler(AutomationElement.Wrap(sender), args);
 }
Пример #26
0
 internal TreeWalker Wrap(UIAutomationClient.IUIAutomationTreeWalker obj)
 {
     return (obj == null) ? null : Wrap(obj);
 }
Пример #27
0
 internal CacheRequest(UIAutomationClient.IUIAutomationCacheRequest obj)
 {
     Debug.Assert(obj != null);
     this._obj = obj;
     this._lock = new object();
 }
Пример #28
0
 private TransformPattern2(AutomationElement el, UIAutomationClient.IUIAutomationTransformPattern2 pattern2, UIAutomationClient.IUIAutomationTransformPattern pattern, bool cached)
     : base(el, pattern, cached)
 {
     Debug.Assert(pattern2 != null);
     this._pattern = pattern2;
 }