private async void NodeSelected(object sender, RoutedEventArgs e) { TreeViewItem currContainer = e.OriginalSource as TreeViewItem; if (currContainer != null) { FWindow.TVItem = currContainer; await ListBoxUtility.PopulateListBox(currContainer); } }
private async void FilterTextBox_Search_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e) { if (PAKEntries.PAKToDisplay != null && FileNames != null) { List <FileInfo> filtered = new List <FileInfo>(); string[] filters = FilterTextBox_Search.Text.Trim().Split(' '); await Task.Run(() => { foreach (FileInfo fi in FileNames) { bool checkSearch = false; if (filters.Length > 1) { foreach (string filter in filters) { checkSearch = ListBoxUtility.CaseInsensitiveContains(fi.Name, filter); if (!checkSearch) { break; } } } else { checkSearch = ListBoxUtility.CaseInsensitiveContains(fi.Name, filters[0]); } if (checkSearch) { filtered.Add(fi); } } }); DataGrid_Search.ItemsSource = filtered; } }
private async void FilterTextBox_Main_TextChanged(object sender, TextChangedEventArgs e) { await ListBoxUtility.FilterListBox(); }