#pragma warning disable CA1725 // Parameter names should match base declaration
        public void HandleTextEditTextChangedEvent(IUIAutomationElement sender, TextEditChangeType textEditChangeType, string[] eventStrings)
#pragma warning restore CA1725 // Parameter names should match base declaration
        {
#pragma warning disable CA2000 // Call IDisposable.Dispose()
            var m = EventMessage.GetInstance(this.EventId, sender);

            if (m != null)
            {
                m.Properties = new List <KeyValuePair <string, dynamic> >
                {
                    new KeyValuePair <string, dynamic>("TextEditChangeType", textEditChangeType.ToString()),
                };

                if (eventStrings != null)
                {
                    for (int i = 0; i < eventStrings.Length; i++)
                    {
                        m.Properties.Add(new KeyValuePair <string, dynamic>(Invariant($"[{i}]"), eventStrings.GetValue(i)));
                    }
                }

                this.ListenEventMessage(m);
            }
#pragma warning restore CA2000
        }
Exemplo n.º 2
0
 public virtual extern void AddTextEditTextChangedEventHandler(
     [MarshalAs(unmanagedType: UnmanagedType.Interface), In]
     IUIAutomationElement element,
     [In] TreeScope scope,
     [In] TextEditChangeType TextEditChangeType,
     [MarshalAs(unmanagedType: UnmanagedType.Interface), In]
     IUIAutomationCacheRequest cacheRequest,
     [MarshalAs(unmanagedType: UnmanagedType.Interface), In]
     IUIAutomationTextEditTextChangedEventHandler handler);
Exemplo n.º 3
0
        public void HandleTextEditTextChangedEvent(IUIAutomationElement sender, TextEditChangeType type, string[] array)
        {
            var m = EventMessage.GetInstance(this.EventId, sender);

            if (m != null)
            {
                m.Properties = new List <KeyValuePair <string, dynamic> >
                {
                    new KeyValuePair <string, dynamic>("TextEditChangeType", type.ToString()),
                };
                for (int i = 0; i < array.Length; i++)
                {
                    m.Properties.Add(new KeyValuePair <string, dynamic>(Invariant($"[{i}]"), array.GetValue(i)));
                }
                ;

                this.ListenEventMessage(m);
            }
        }
        public void HandleTextEditTextChangedEvent(IUIAutomationElement sender, TextEditChangeType type, string[] array)
        {
#pragma warning disable CA2000 // Call IDisposable.Dispose()
            var m = EventMessage.GetInstance(this.EventId, sender);

            if (m != null)
            {
                m.Properties = new List <KeyValuePair <string, dynamic> >
                {
                    new KeyValuePair <string, dynamic>("TextEditChangeType", type.ToString()),
                };

                if (array != null)
                {
                    for (int i = 0; i < array.Length; i++)
                    {
                        m.Properties.Add(new KeyValuePair <string, dynamic>(Invariant($"[{i}]"), array.GetValue(i)));
                    }
                }

                this.ListenEventMessage(m);
            }
#pragma warning restore CA2000
        }
Exemplo n.º 5
0
        /// <inheritdoc />
        public override TextEditTextChangedEventHandlerBase RegisterTextEditTextChangedEventHandler(TreeScope treeScope, TextEditChangeType textEditChangeType, Action <SHAutomationElement, TextEditChangeType, string[]> action)
        {
            var eventHandler = new UIA3TextEditTextChangedEventHandler(this, action);

            Automation.NativeAutomation3.AddTextEditTextChangedEventHandler(NativeElement, (UIA.TreeScope)treeScope, (UIA.TextEditChangeType)textEditChangeType, null, eventHandler);
            return(eventHandler);
        }
 /// <summary>
 /// Registers a method that handles a text edit text changed event.
 /// </summary>
 public abstract TextEditTextChangedEventHandlerBase RegisterTextEditTextChangedEventHandler(TreeScope treeScope, TextEditChangeType textEditChangeType, Action <AutomationElement, TextEditChangeType, string[]> action);
 public void HandleTextEditTextChangedEvent(AutomationElement sender, TextEditChangeType textEditChangeType, string[] eventStrings)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 8
0
 /// <inheritdoc />
 public TextEditTextChangedEventHandlerBase RegisterTextEditTextChangedEventHandler(TreeScope treeScope, TextEditChangeType textEditChangeType, Action <AutomationElement, TextEditChangeType, string[]> action)
 {
     return(FrameworkAutomationElement.RegisterTextEditTextChangedEventHandler(treeScope, textEditChangeType, action));
 }
Exemplo n.º 9
0
 /// <inheritdoc />
 public override TextEditTextChangedEventHandlerBase RegisterTextEditTextChangedEventHandler(TreeScope treeScope, TextEditChangeType textEditChangeType, Action <AutomationElement, TextEditChangeType, string[]> action)
 {
     throw new NotSupportedByFrameworkException();
 }
Exemplo n.º 10
0
 protected void HandleTextEditTextChangedEvent(SHAutomationElement sender, TextEditChangeType textEditChangeType, string[] eventstrings)
 {
     _callAction(sender, textEditChangeType, eventstrings);
 }