//TODO While recording you get exception when clicking at the corner of the cell public override void HookEvents(UIItemEventListener eventListener) { var safeAutomationEventHandler = new SafeAutomationEventHandler(this, eventListener, objs => ListViewEvent.Create(this, (AutomationPropertyChangedEventArgs)objs[0])); handler = safeAutomationEventHandler.PropertyChange; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Descendants, handler, SelectionItemPattern.IsSelectedProperty); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate(object sender, AutomationPropertyChangedEventArgs e) { if (e.NewValue.Equals(1)) return; eventListener.EventOccured(new ListBoxEvent(this, SelectedItemText)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Descendants, handler, SelectionItemPattern.IsSelectedProperty); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { ActionPerformed(); eventListener.EventOccured(new CheckBoxEvent(this)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Element, handler, TogglePattern.ToggleStateProperty); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { ActionPerformed(); eventListener.EventOccured(new CheckBoxEvent(this)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Element, handler, TogglePattern.ToggleStateProperty); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate(object sender, AutomationPropertyChangedEventArgs e) { if (e.NewValue.Equals(1)) { return; } eventListener.EventOccured(new ListBoxEvent(this, SelectedItemText)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Descendants, handler, SelectionItemPattern.IsSelectedProperty); }
public override void HookEvents(UIItemEventListener eventListener) { lastSelectedItem = SelectedItem; handler = delegate(object sender, AutomationPropertyChangedEventArgs e) { if (SelectedItem == null || e.NewValue.Equals(1)) return; if (SameListItem()) return; lastSelectedItem = SelectedItem; eventListener.EventOccured(new ComboBoxEvent(this, SelectedItemText)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Element, handler, ExpandCollapsePattern.ExpandCollapseStateProperty); }
public override void HookEvents(UIItemEventListener eventListener) { lastSelectedItem = SelectedItem; handler = delegate(object sender, AutomationPropertyChangedEventArgs e) { if (SelectedItem == null || e.NewValue.Equals(1)) { return; } if (SameListItem()) { return; } lastSelectedItem = SelectedItem; eventListener.EventOccured(new ComboBoxEvent(this, SelectedItemText)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Element, handler, ExpandCollapsePattern.ExpandCollapseStateProperty); }
public override void HookEvents(UIItemEventListener eventListener) { clickedTreeNodeHandler = delegate { TreeNode node = ClickedNode; eventListener.EventOccured((new TreeNodeClickedEvent(this, node, node.IsExpanded()))); }; selectedTreeNodeHandler = delegate { TreeNode node = SelectedNode; eventListener.EventOccured((new TreeNodeSelectEvent(this, node))); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Subtree, clickedTreeNodeHandler, ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty); Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Subtree, selectedTreeNodeHandler, SelectionItemPatternIdentifiers.IsSelectedProperty); }
public override void HookEvents(UIItemEventListener eventListener) { clickedTreeNodeHandler = delegate { TreeNode node = ClickedNode; eventListener.EventOccured((new TreeNodeClickedEvent(this, node, node.IsExpanded()))); }; selectedTreeNodeHandler = delegate { TreeNode node = SelectedNode; eventListener.EventOccured((new TreeNodeSelectEvent(this, node))); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Subtree, clickedTreeNodeHandler, ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty); Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Subtree, selectedTreeNodeHandler, SelectionItemPatternIdentifiers.IsSelectedProperty); }
public SafeAutomationEventHandler(IUIItem uiItem, UIItemEventListener eventListener, Create createUserEvent) { this.uiItem = uiItem; this.eventListener = eventListener; this.createUserEvent = createUserEvent; }
public override void HookEvents(UIItemEventListener eventListener) { HookClickEvent(eventListener); }
//TODO While recording you get exception when clicking at the corner of the cell public override void HookEvents(UIItemEventListener eventListener) { var safeAutomationEventHandler = new SafeAutomationEventHandler(this, eventListener, objs => ListViewEvent.Create(this, (AutomationPropertyChangedEventArgs) objs[0])); handler = safeAutomationEventHandler.PropertyChange; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Descendants, handler, SelectionItemPattern.IsSelectedProperty); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new TabEvent(this)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Descendants, handler, SelectionItemPattern.IsSelectedProperty); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new MultilineTextBoxEvent(this)); }; Automation.AddAutomationEventHandler(TextPattern.TextSelectionChangedEvent, automationElement, TreeScope.Element, handler); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new TextBoxEvent(this)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Element, handler, ValuePattern.ValueProperty); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new TabEvent(this)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Descendants, handler, SelectionItemPattern.IsSelectedProperty); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { }; Automation.AddAutomationEventHandler(AutomationElement.MenuOpenedEvent, automationElement, TreeScope.Descendants, handler); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new RadioButtonEvent(this)); }; Automation.AddAutomationEventHandler(SelectionItemPattern.ElementSelectedEvent, automationElement, TreeScope.Element, handler); }
protected virtual void HookClickEvent(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new UIItemClickEvent(this)); }; Automation.AddAutomationEventHandler(InvokePattern.InvokedEvent, automationElement, TreeScope.Element, handler); }
/// <summary> /// Internal to white and intended to be used for white recording /// </summary> /// <param name="eventListener"></param> public virtual void HookEvents(UIItemEventListener eventListener) { }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new RadioButtonEvent(this)); }; Automation.AddAutomationEventHandler(SelectionItemPattern.ElementSelectedEvent, automationElement, TreeScope.Element, handler); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new TextBoxEvent(this)); }; Automation.AddAutomationPropertyChangedEventHandler(automationElement, TreeScope.Element, handler, ValuePattern.ValueProperty); }
public override void HookEvents(UIItemEventListener eventListener) { HookClickEvent(eventListener); }
protected virtual void HookClickEvent(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new UIItemClickEvent(this)); }; Automation.AddAutomationEventHandler(InvokePattern.InvokedEvent, automationElement, TreeScope.Element, handler); }
public SafeAutomationEventHandler(IUIItem uiItem, UIItemEventListener eventListener, Create createUserEvent) { this.uiItem = uiItem; this.eventListener = eventListener; this.createUserEvent = createUserEvent; }
/// <summary> /// Internal to white and intended to be used for white recording /// </summary> /// <param name="eventListener"></param> public virtual void HookEvents(UIItemEventListener eventListener) { }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { }; Automation.AddAutomationEventHandler(AutomationElement.MenuOpenedEvent, automationElement, TreeScope.Descendants, handler); }
public override void HookEvents(UIItemEventListener eventListener) { handler = delegate { eventListener.EventOccured(new MultilineTextBoxEvent(this)); }; Automation.AddAutomationEventHandler(TextPattern.TextSelectionChangedEvent, automationElement, TreeScope.Element, handler); }