コード例 #1
0
        public ITextRangeProvider RangeFromChild(IRawElementProviderSimple childElement)
        {
            if (!(childElement is ElementProxy))
            {
                throw new ArgumentException(SR.Get(SRID.TextProvider_InvalidChild, "childElement"));
            }

            return((ITextRangeProvider)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(RangeFromChild), childElement));
        }
コード例 #2
0
        public bool Compare(ITextRangeProvider range)
        {
            if (!(range is TextRangeProviderWrapper))
            {
                throw new ArgumentException(SR.Get(SRID.TextRangeProvider_InvalidRangeProvider, "range"));
            }

            return((bool)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Compare), range));
        }
コード例 #3
0
        public IRawElementProviderFragment GetFocus()
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                return(null);
            }
            return((IRawElementProviderFragment)ElementUtil.Invoke(peer, state => ((ElementProxy)state).InContextGetFocus(), this));
        }
コード例 #4
0
        public void SetFocus()
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                throw new ElementNotAvailableException();
            }
            ElementUtil.Invoke(peer, state => ((ElementProxy)state).InContextSetFocus(), this);
        }
コード例 #5
0
        public int [] GetRuntimeId()
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                throw new ElementNotAvailableException();
            }
            return((int [])ElementUtil.Invoke(peer, state => ((ElementProxy)state).InContextGetRuntimeId(), this));
        }
コード例 #6
0
ファイル: ElementProxy.cs プロジェクト: dox0/DotNet471RS3
        //------------------------------------------------------
        //
        //  Interface IRawElementProviderFragmentRoot
        //
        //------------	------------------------------------------

        #region Interface IRawElementProviderFragmentRoot
        // Implementation of the interface that exposes this
        // to UIAutomation.
        //
        // Interface IRawElementProviderFragmentRoot 'derives' from
        // IRawElementProviderSimple and IRawElementProviderFragment,
        // methods from those appear first below.
        //
        // Most of the interface methods on this interface need
        // to get onto the Visual's context before they can access it,
        // so use Dispatcher.Invoke to call a private method (in the
        // private methods section of this class) that does the real work.

        // IRawElementProviderSimple methods...

        public object GetPatternProvider(int pattern)
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                throw new ElementNotAvailableException();
            }
            return(ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextGetPatternProvider), pattern));
        }
コード例 #7
0
ファイル: ElementProxy.cs プロジェクト: dox0/DotNet471RS3
        // IRawElementProviderFragmentRoot methods..
        public IRawElementProviderFragment ElementProviderFromPoint(double x, double y)
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                return(null);
            }
            return((IRawElementProviderFragment)ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextElementProviderFromPoint), new Point(x, y)));
        }
コード例 #8
0
ファイル: ElementProxy.cs プロジェクト: dox0/DotNet471RS3
        public IRawElementProviderFragment GetFocus()
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                return(null);
            }
            return((IRawElementProviderFragment)ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextGetFocus), null));
        }
コード例 #9
0
ファイル: ElementProxy.cs プロジェクト: dox0/DotNet471RS3
        public int [] GetRuntimeId()
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                throw new ElementNotAvailableException();
            }
            return((int [])ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextGetRuntimeId), null));
        }
コード例 #10
0
ファイル: ElementProxy.cs プロジェクト: dox0/DotNet471RS3
        public void SetFocus()
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                throw new ElementNotAvailableException();
            }
            ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextSetFocus), null);
        }
コード例 #11
0
ファイル: ElementProxy.cs プロジェクト: dox0/DotNet471RS3
        // IRawElementProviderFragment methods...

        public IRawElementProviderFragment Navigate(NavigateDirection direction)
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                return(null);
            }
            return((IRawElementProviderFragment)ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextNavigate), direction));
        }
コード例 #12
0
ファイル: ElementProxy.cs プロジェクト: dox0/DotNet471RS3
        public object GetPropertyValue(int property)
        {
            AutomationPeer peer = Peer;

            if (peer == null)
            {
                throw new ElementNotAvailableException();
            }
            return(ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextGetPropertyValue), property));
        }
コード例 #13
0
        public int CompareEndpoints(TextPatternRangeEndpoint endpoint, ITextRangeProvider targetRange, TextPatternRangeEndpoint targetEndpoint)
        {
            if (!(targetRange is TextRangeProviderWrapper))
            {
                throw new ArgumentException(SR.Get(SRID.TextRangeProvider_InvalidRangeProvider, "targetRange"));
            }

            object[] args = new object[] { endpoint, targetRange, targetEndpoint };
            return((int)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(CompareEndpoints), args));
        }
コード例 #14
0
        //------------------------------------------------------
        //
        //  Interface IItemContainerProvider
        //
        //------------------------------------------------------

        #region Interface IItemContainerProvider

        public IRawElementProviderSimple FindItemByProperty(IRawElementProviderSimple startAfter, int propertyId, object value)
        {
            object [] args = new object[] { startAfter, propertyId, value };
            return((IRawElementProviderSimple)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(FindItemByProperty), args));
        }
コード例 #15
0
 public void SetScrollPercent(double horizontalPercent, double verticalPercent)
 {
     ElementUtil.Invoke(_peer, new DispatcherOperationCallback(SetScrollPercent), new double [] { horizontalPercent, verticalPercent });
 }
コード例 #16
0
        //------------------------------------------------------
        //
        //  Interface IScrollProvider
        //
        //------------------------------------------------------

        #region Interface IScrollProvider

        public void Scroll(ScrollAmount horizontalAmount, ScrollAmount verticalAmount)
        {
            ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Scroll), new ScrollAmount [] { horizontalAmount, verticalAmount });
        }
コード例 #17
0
        //------------------------------------------------------
        //
        //  Interface IValueProvider
        //
        //------------------------------------------------------

        #region Interface IValueProvider

        public void SetValue(string val)
        {
            ElementUtil.Invoke(_peer, new DispatcherOperationCallback(SetValueInternal), val);
        }
コード例 #18
0
 public void Resize(double width, double height)
 {
     ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Resize), new double [] { width, height });
 }
コード例 #19
0
 public IRawElementProviderSimple [] GetColumnHeaderItems()
 {
     return((IRawElementProviderSimple [])ElementUtil.Invoke(_peer, new DispatcherOperationCallback(GetColumnHeaderItems), null));
 }
コード例 #20
0
        //------------------------------------------------------
        //
        //  Interface IExpandCollapseProvider
        //
        //------------------------------------------------------

        #region Interface IExpandCollapseProvider

        public void Expand()
        {
            ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Expand), null);
        }
コード例 #21
0
        //------------------------------------------------------
        //
        //  Interface IDockProvider
        //
        //------------------------------------------------------

        #region Interface IDockProvider

        public void SetDockPosition(DockPosition dockPosition)
        {
            ElementUtil.Invoke(_peer, new DispatcherOperationCallback(SetDockPosition), dockPosition);
        }
        //------------------------------------------------------
        //
        //  Interface ISynchronizedInputProvider
        //
        //------------------------------------------------------

        #region Interface ISynchronizedInputProvider

        public void StartListening(SynchronizedInputType inputType)
        {
            ElementUtil.Invoke(_peer, new DispatcherOperationCallback(StartListening), inputType);
        }
 public void Cancel()
 {
     ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Cancel), null);
 }
コード例 #24
0
        //------------------------------------------------------
        //
        //  Interface IInvokeProvider
        //
        //------------------------------------------------------

        #region Interface IScrollItemProvider

        public void ScrollIntoView()
        {
            ElementUtil.Invoke(_peer, new DispatcherOperationCallback(ScrollIntoView), null);
        }
コード例 #25
0
 public void Collapse()
 {
     ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Collapse), null);
 }
コード例 #26
0
        //------------------------------------------------------
        //
        //  Interface IWindowProvider
        //
        //------------------------------------------------------

        #region Interface IWindowProvider

        public void SetVisualState(WindowVisualState state)
        {
            ElementUtil.Invoke(_peer, new DispatcherOperationCallback(SetVisualState), state);
        }
コード例 #27
0
        //------------------------------------------------------
        //
        //  Interface IWindowProvider
        //
        //------------------------------------------------------

        #region Interface ITransformProvider


        public void Move(double x, double y)
        {
            ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Move), new double [] { x, y });
        }
コード例 #28
0
 public bool WaitForInputIdle(int milliseconds)
 {
     return((bool)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(WaitForInputIdle), milliseconds));
 }
コード例 #29
0
 public void Rotate(double degrees)
 {
     ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Rotate), degrees);
 }
コード例 #30
0
 public int [] GetSupportedViews()
 {
     return((int [])ElementUtil.Invoke(_peer, new DispatcherOperationCallback(GetSupportedViews), null));
 }