private void TxtSearch_TextChanged(object sender, EventArgs e) { SuggestionsList.Clear(); foreach (string s in Querier.AutoComplete(TxtSearch.Text, 4)) { SuggestionsList.Add(s); } OpenSearchPage(); }
void FillSuggestions() { List <string> suggestions = Querier.AutoComplete(TxtSearch1.Text, 5); if (InvokeRequired) { this.Invoke(new Action(() => ShowSuggestions(suggestions))); } }