private void LoadFilteredAddress(AddressLocationType filter)
        {
            using (this.Services().Message.ShowProgressNonModal())
            {
                AllAddresses.Clear();

                _isShowingFilteredList = true;

                AllAddresses.AddRange(FilteredPlaces.Where(place => place.Address.AddressLocationType == filter));
            }
        }
Пример #2
0
        private void fetchPlaces()
        {
            fetchPlacesButton.Invoke(new Action(() => fetchPlacesButton.Enabled = false));
            List <Place>   FilteredPlacesIveBeenList = new List <Place>();
            FilteredPlaces placesIveBeenToThisYear   = new FilteredPlaces(new PlacesIveBeenToThisYear());

            placesIveBeenToThisYear.Filter(FilteredPlacesIveBeenList);

            placesListBox.Invoke(new Action(() => placesListBox.Items.Clear()));
            placesListBox.Invoke(new Action(() => placesListBox.DisplayMember = "FullPlaceName"));

            foreach (Place place in FilteredPlacesIveBeenList)
            {
                placesListBox.Invoke(new Action(() => placesListBox.Items.Add(place)));
            }

            fetchPlacesButton.Invoke(new Action(() => fetchPlacesButton.Enabled = true));
        }