Esempio n. 1
0
 public void FindPrevious()
 {
     if (SearchedItems != null && SearchedItems.Count > 0)
     {
         if (matchindex - 1 < SearchedItems.Count && matchindex != 0)
         {
             ApplyInline(SearchedItems[matchindex], false);
             ApplyInline(SearchedItems[matchindex - 1], true);
             Treeview.BringIntoView(SearchedItems[matchindex - 1]);
             matchindex--;
         }
         else
         {
             ApplyInline(SearchedItems[matchindex], false);
             matchindex = SearchedItems.Count - 1;
             ApplyInline(SearchedItems[matchindex], true);
             Treeview.BringIntoView(SearchedItems[matchindex]);
         }
     }
 }
Esempio n. 2
0
 public void FindNext()
 {
     if (SearchedItems != null && SearchedItems.Count > 0)
     {
         ApplyInline(SearchedItems[matchindex], false);
         if (matchindex + 1 < SearchedItems.Count)
         {
             ApplyInline(SearchedItems[matchindex + 1], true);
             Treeview.BringIntoView(SearchedItems[matchindex + 1]);
             matchindex++;
         }
         else
         {
             ApplyInline(SearchedItems[matchindex], false);
             matchindex = 0;
             ApplyInline(SearchedItems[0], true);
             Treeview.BringIntoView(SearchedItems[0]);
         }
     }
 }