Example #1
0
        public bool IncrementalSearchNext(string text, MoveDirection dir)
        {
            JetListViewNode curNode    = _selection.ActiveNode;
            IEnumerator     enumerator = (dir == MoveDirection.Down)
                ? _nodeCollection.EnumerateNodesForward(curNode)
                : _nodeCollection.EnumerateNodesBackward(curNode);

            enumerator.MoveNext();

            if (SearchEnumerator(text, enumerator, null))
            {
                return(true);
            }

            JetListViewNode startNode = (dir == MoveDirection.Down)
                ? _nodeCollection.Nodes [0]
                : _nodeCollection.LastNode;

            if (curNode == startNode)
            {
                return(false);
            }

            enumerator = _nodeCollection.GetDirectionalEnumerator(startNode, dir);
            return(SearchEnumerator(text, enumerator, curNode));
        }
Example #2
0
 public void SelectAll()
 {
     if (_nodeCollection.VisibleItemCount > 0)
     {
         IEnumerator enumerator = _nodeCollection.EnumerateNodesForward(_nodeCollection.Nodes [0]);
         while (enumerator.MoveNext())
         {
             SelectNode((IViewNode)enumerator.Current);
         }
     }
 }