public Object filtering(String generatedNodeId, TreeScopeEnum treeScope) { if (generatedNodeId == null) { return(null); } return(filtering(treeOperation.searchNodes.getFilteredTreeOsmElementById(generatedNodeId), treeScope)); }
/// <summary> /// filters an application depending on a given point (<paramref name="pointX"/>, <paramref name="pointY"/>) and the choosen <paramref name="treeScope"/> /// </summary> /// <param name="pointX">x coordinate of the element to filtering</param> /// <param name="pointY">y coordinate of the element to filtering</param> /// <param name="treeScope">kind of filtering</param> /// <param name="depth">depth of filtering for the <paramref name="treeScope"/> of 'Parent', 'Children' and 'Application'; <code>-1</code> means the whole depth</param> /// <returns>the filtered (sub-)tree</returns> public Object filtering(int pointX, int pointY, TreeScopeEnum treeScope, int depth = -1) { AutomationElement mainElement = deliverAutomationElementFromCursor(pointX, pointY); if (mainElement == null) { throw new ArgumentException("The AutomationElement is 'null'!"); } Object tree = getStrategyMgr().getSpecifiedTree().NewTree(); // UIAEventsMonitor uiaEvents = new UIAEventsMonitor(); // uiaEvents.eventsUIA_withAutomationElement(mainElement); return(filtering(mainElement, treeScope, depth)); }
/// <summary> /// filters an application depending on a given AutomationElement; /// only if the whole tree is filtered (TreeScopeEnum.Application) the ids for each node will be generated and set /// </summary> /// <param name="automationElement"> the AutomationElement of the filtered element</param> /// <param name="treeScope">kind of filtering</param> /// <param name="depth">depth of filtering for the <paramref name="treeScope"/> of 'Ancestors', 'Children' and 'Application'; <code>-1</code> means the whole depth</param> /// <returns>the filtered (sub-)tree</returns> private Object filtering(AutomationElement automationElement, TreeScopeEnum treeScope, int depth) { Object tree = getStrategyMgr().getSpecifiedTree().NewTree(); if (automationElement == null) { throw new ArgumentException("The AutomationElement is 'null'!"); } switch (treeScope) { case TreeScopeEnum.Sibling: filterSibling(automationElement, ref tree); break; case TreeScopeEnum.Children: filterChildren(automationElement, depth, ref tree); break; case TreeScopeEnum.Descendants: // same like as 'Children' but also all "child children" filterChildren(automationElement, -1, ref tree); break; case TreeScopeEnum.Subtree: filterSubtree(automationElement, ref tree); break; case TreeScopeEnum.Element: filterElement(automationElement, ref tree); setSpecialPropertiesOfFirstNode(ref tree); break; case TreeScopeEnum.Ancestors: // same like parents filterParents(automationElement, ref tree); break; case TreeScopeEnum.Application: filterApplication(automationElement, depth, ref tree); // note by the first node the filter strategy and ModulName setSpecialPropertiesOfFirstNode(ref tree); treeOperation.generatedIds.generatedIdsOfFilteredTree(ref tree); break; } return(tree); }
/// <summary> /// Filtered an OSM node (and depending on the <para>treescope</para> his sibilings, parents children etc. ) and updates the filtered tree object /// </summary> /// <param name="generatedId">the generated id of a node in the filtered tree</param> /// <param name="treescope">the scope for filtering</param> /// <param name="eventAction"></param> public void filterOSM(string generatedId, TreeScopeEnum treescope, String eventAction) { if (generatedId == null) { return; } switch (treescope) { case TreeScopeEnum.Ancestors: throw new NotImplementedException(); break; case TreeScopeEnum.Sibling: throw new NotImplementedException(); break; default: //Application, Subtree, Children, Descendants, Element treeOperations.updateNodes.filteredTree(generatedId, treescope); break; } }
/// <summary> /// filters an application depending on a given OSM element /// </summary> /// <param name="osmElementOfFirstNodeOfSubtree">osm element of the to filtered application</param> /// <param name="treeScope">kind of filtering</param> /// <returns>the filtered (sub-)tree</returns> public Object filtering(OSMElements.OSMElement osmElementOfFirstNodeOfSubtree, TreeScopeEnum treeScope) { AutomationElement au = getAutomationelementOfOsmElement(osmElementOfFirstNodeOfSubtree); if (au != null) { return(filtering(au, treeScope, -1)); } return(null); }
/// <summary> /// filters an application depending on a given hwnd /// </summary> /// <param name="hwnd">the process handle of applicatio/element</param> /// <param name="treeScope">kind of filtering</param> /// <param name="depth">depth of filtering for the <paramref name="treeScope"/> of 'Parent', 'Children' and 'Application'; <code>-1</code> means the whole depth</param> /// <returns>the filtered (sub-)tree</returns> public Object filtering(IntPtr hwnd, TreeScopeEnum treeScope = TreeScopeEnum.Application, int depth = -1) { AutomationElement mainElement = deliverAutomationElementFromHWND(hwnd); return(filtering(mainElement, treeScope, depth)); }
public object filtering(string generatedNodeId, TreeScopeEnum treeScope) { throw new NotImplementedException(); }
public Object filtering(OSMElements.OSMElement osmElementOfFirstNodeOfSubtree, TreeScopeEnum treeScopeEnum) { throw new NotImplementedException(); }
public Object filtering(IntPtr hwnd, TreeScopeEnum treeScope, int depth) { throw new NotImplementedException(); }
public Object filtering(int pointX, int pointY, TreeScopeEnum treeScope, int depth) { return(specifiedTree); }
/// <summary> /// Refreshs all Braille OSM elements depending on the given id of a node in the filtered tree; it wouldn't be filtered /// </summary> /// <param name="idGeneratedOfFilteredNode">a node id of the filtered tree; the connected (Braille) nodes will be refreshed</param> /// <param name="treescopeOfFilteredNode">the tree scope for updating based on the filtered tree</param> /// <param name="onlyActiveScreen"><c>true</c> if only the Braille nodes on the active scree shold be updated, otherwise all connected Braille nodes will be updated</param> public void refreshBrailleOSM(string idGeneratedOfFilteredNode, TreeScopeEnum treescopeOfFilteredNode, bool onlyActiveScreen = true) { treeOperations.updateNodes.refreshBrailleOSM(idGeneratedOfFilteredNode, treescopeOfFilteredNode, onlyActiveScreen); }