public AutoCompleteEntry(string name, params string[] matchList) { this.displayName = name; for (int i = 0; i < matchList.Length; i++) { matchList[i] = CStringUtils.RemoveUnicodeChar(matchList[i]); } this.matchStrings = matchList; }
protected virtual AutoCompleteEntryCollection FilterList(AutoCompleteEntryCollection list) { AutoCompleteEntryCollection newList = new AutoCompleteEntryCollection(); foreach (IAutoCompleteEntry entry in list) { foreach (string match in entry.MatchStrings) { //if (match.ToUpper().StartsWith(this.Text.ToUpper())) string text = CStringUtils.RemoveUnicodeChar(this.Text); if (match.ToUpper().Contains(text.ToUpper())) { newList.Add(entry); break; } } } return(newList); }