public IElement [] GetSelection () { int nSelectedChildren = AtspiSelection.NSelectedChildren; if (nSelectedChildren < 0) nSelectedChildren = 0; IElement [] currentSelection = new IElement [nSelectedChildren]; Selection selection = AtspiSelection; for (int i = 0; i < nSelectedChildren; i++) currentSelection [i] = Element.GetElement (selection.GetSelectedChild (i)); return currentSelection; }
public SelectionEventHandler(Element element, SelectionSource source) { this.source = source; this.element = element; oldSelection = source.GetSelection(); element.accessible.ObjectEvents.SelectionChanged += OnSelectionChanged; }