protected virtual AutoCompleteEntryCollection FilterList(AutoCompleteEntryCollection list) { AutoCompleteEntryCollection newList = new AutoCompleteEntryCollection(); try { foreach (IAutoCompleteEntry entry in list) { foreach (string match in entry.MatchStrings) { //TODO consider using a hash value rather than a string comparison to compare matches if (match.ToUpper().Contains(Text.ToUpper())) { newList.Add(entry); break; } } } } catch (Exception e) { MessageBox.Show(e.ToString()); } return(newList); }
protected virtual AutoCompleteEntryCollection FilterList(AutoCompleteEntryCollection list) { AutoCompleteEntryCollection newList = new AutoCompleteEntryCollection(); foreach (IAutoCompleteEntry entry in list) { foreach (string match in entry.MatchStrings) { if (match.ToUpper().Contains(Text.ToUpper())) { newList.Add(entry); break; } } } return(newList); }
protected virtual AutoCompleteEntryCollection FilterList(AutoCompleteEntryCollection list) { AutoCompleteEntryCollection newList = new AutoCompleteEntryCollection(); foreach (IAutoCompleteEntry entry in list) { foreach (string match in entry.MatchStrings) { if (match.ToUpper().Contains(Text.ToUpper())) { newList.Add(entry); break; } } } return newList; }
protected virtual AutoCompleteEntryCollection FilterList(AutoCompleteEntryCollection list) { AutoCompleteEntryCollection newList = new AutoCompleteEntryCollection(); try { foreach (IAutoCompleteEntry entry in list) { foreach (string match in entry.MatchStrings) { //TODO consider using a hash value rather than a string comparison to compare matches if (match.ToUpper().Contains(Text.ToUpper())) { newList.Add(entry); break; } } } } catch (Exception e) { MessageBox.Show(e.ToString()); } return newList; }