private void FillListBox() { foreach (TourItem item in _tourItemFactory.GetItems()) { TourItemsList.Add(item); } PreselectListviewItem(); }
private void AddTourItem(object commandParameter) { TourItem newItem = _tourItemFactory.AddTourItem(); TourItemsList.Add(newItem); if (TourItemsList.Count < 2) { PreselectListviewItem(); } }
private void Search(object commandParameter) { log.Info($"Search for {SearchName} in tour data"); IEnumerable foundItems = _tourItemFactory.Search(SearchName); TourItemsList.Clear(); foreach (TourItem item in foundItems) { TourItemsList.Add(item); } PreselectListviewItem(); }