Example #1
0
        //------------------------------------------------------
        //
        //  Internal Methods
        //
        //------------------------------------------------------

        #region Internal Methods

        internal override void Process()
        {
            // Grab properties for cache request here...
            AutomationElement src;

            if (_srcEl == null)
            {
                src = null;
            }
            else
            {
                UiaCoreApi.UiaCacheResponse response = UiaCoreApi.UiaGetUpdatedCache(_srcEl.RawNode, _request, UiaCoreApi.NormalizeState.View, null);
                src = CacheHelper.BuildAutomationElementsFromResponse(_request, response);
            }

            //

            if (!(src == null && _e.EventId == AutomationElement.AutomationFocusChangedEvent))
            {
                InvokeHandlers.InvokeClientHandler(_clientCallback, src, _e);
            }
        }
        //------------------------------------------------------
        //
        //  Internal Methods
        //
        //------------------------------------------------------

        #region Internal Methods

        internal override void Process()
        {
            // Grab properties for cache request here...
            AutomationElement src;

            if (_srcEl == null)
            {
                src = null;
            }
            else
            {
                UiaCoreApi.UiaCacheResponse response = UiaCoreApi.UiaGetUpdatedCache(_srcEl.RawNode, _request, UiaCoreApi.NormalizeState.View, null);
                src = CacheHelper.BuildAutomationElementsFromResponse(_request, response);
            }

            // We need to find out why this situation should occur at (aside from a window closed event) and
            // handle the cause.
            if (!(src == null && _e.EventId == AutomationElement.AutomationFocusChangedEvent))
            {
                InvokeHandlers.InvokeClientHandler(_clientCallback, src, _e);
            }
        }
        //------------------------------------------------------
        //
        //  Internal Methods
        //
        //------------------------------------------------------

        #region Internal Methods

        internal override void Process()
        {
            AutomationElement el = CacheHelper.BuildAutomationElementsFromResponse(_cacheRequest, _cacheResponse);

            InvokeHandlers.InvokeClientHandler(_clientCallback, el, _e);
        }