public string[] getlist() { string filename = this.getTxtfilename(); string[] lines = System.IO.File.ReadAllLines(SymbolList.readItemPath(filename)); this.replace(ref lines, "\t", " "); return(lines); }
private void setAutocomplete(ref TextBox tb, string filename) { SymbolList.SymbolList sl = new SymbolList.SymbolList(filename); tb.AutoCompleteMode = AutoCompleteMode.Suggest; tb.AutoCompleteSource = AutoCompleteSource.CustomSource; AutoCompleteStringCollection collection = new AutoCompleteStringCollection(); collection.AddRange(sl.getlist()); tb.AutoCompleteCustomSource = collection; }