예제 #1
0
        private void FillListBox()
        {
            foreach (TourItem item in _tourItemFactory.GetItems())
            {
                TourItemsList.Add(item);
            }

            PreselectListviewItem();
        }
예제 #2
0
        private void AddTourItem(object commandParameter)
        {
            TourItem newItem = _tourItemFactory.AddTourItem();

            TourItemsList.Add(newItem);

            if (TourItemsList.Count < 2)
            {
                PreselectListviewItem();
            }
        }
예제 #3
0
        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();
        }