public void ShowFromToList(String text, int type) { ArrayList list = null; String[] staArray = null; if (text != null) { list = StationList.searchStation(text); staArray = new String[list.Count]; } else { list = StationList.GetVaterStationList(); staArray = new String[list.Count]; } int i = 0; foreach (StationEntity se in list) { staArray[i] = se.name2; i++; } if (type == 1) { this.cb_to.AutoCompleteCustomSource.AddRange(staArray); } else if (type == 2) { this.cb_from.AutoCompleteCustomSource.AddRange(staArray); } //this.cb_from.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; //this.cb_from.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; }