private async Task LoadResourcesAsync()
        {
            LocationCollection locations = new LocationCollection();
            await locations.UpdateLocationsAsync();

            _allLocations = locations.Locations;

            _etage2Locations.Clear();
            _etage3Locations.Clear();

            foreach (Location location in locations.Locations)
            {
                if (location.Etage == Etage.Two)
                {
                    _etage2Locations.Add(location);
                }
                else if (location.Etage == Etage.Three)
                {
                    _etage3Locations.Add(location);
                }
                else
                {
                    throw new MissingLocationException($"{location.Name} location does not exist");
                }
            }

            Buttons = new ObservableCollection <Location>(_etage2Locations);

            await _allUds.LoadElementsAsync();

            //_selectedUdsByLocation = new ObservableCollection<UDS>(_allUds.UDScollection);
            OnPropertyChanged(nameof(SelectedUdsByLocation));
        }
Example #2
0
        private async Task Loadcollections()
        {
            await _locationCollection.UpdateLocationsAsync();

            OnPropertyChanged(nameof(Locations));

            await _udstillingsGenstande.LoadElementsAsync();

            OnPropertyChanged(nameof(UdstillingsGenstande));
        }
 public async void LoadResources()
 {
     _locations.UpdateLocationsAsync();
     OnPropertyChanged(nameof(Locations));
 }