Пример #1
0
    public void DisplayLines()
    {
        var newlines = LinesFromFileOrTraitValue();

        if (newlines != null)
        {
            LinesList.UpdateLineSource(newlines);
        }
    }
Пример #2
0
 public void Filter(string searchText)
 {
     if (searchText.Length > LastSearchText.Length && searchText.StartsWith(LastSearchText))
     {
         //if just adding to the last search (continuing to type) then can filter from what is already showing
         LinesList.UpdateLineSource(LinesList.CurrentLines.FilteredCopy(searchText));
     }
     else
     {
         //...otherwise need to get content from the source
         var newlines = LinesFromFileOrTraitValue();
         newlines = newlines.FilteredCopy(searchText);
         LinesList.UpdateLineSource(newlines);
     }
     LastSearchText = searchText;
 }