Exemple #1
0
        public override async Task OnAppearingAsync()
        {
            await _layerService.InitializeData();

            var zones = await _zoneService.GetAllZoneContractsAsync();

            ZonesList.Clear();
            foreach (var zone in zones)
            {
                var zoneUsers = _layerService.UsersInsideZone(zone.ZoneID);
                ZonesList.Add(new ZoneViewModel(zone, zoneUsers));
            }
            IsBusy = false;
        }
        public override async Task OnAppearingAsync()
        {
            if (!Initialized)
            {
                var profile = await _requestService.GetAsync <UserInfoContract>("api/UserInfoSelf");

                UserProfile = new ProfileViewModel()
                {
                    UserInfo = profile
                };

                Task[] tasks = new Task[] { _layerService.InitializeData(), _zoneService.InitializeData() };
                //await _layerService.InitializeData();
                //await _zoneService.InitializeData();
                await Task.WhenAll(tasks);
                await RefreshPolygonsAsync();

                Initialized = true;
            }
        }
Exemple #3
0
        public override async Task OnAppearingAsync()
        {
            if (ZoneContract == null)
            {
                return;
            }
            SetMapPosition();
            SetPolygons();

            await _layerService.InitializeData();

            var users = _layerService.UsersInsideZone(_zoneContract.ZoneID);

            if (users != null && users.Count > 0)
            {
                ZoneUsers = new ObservableCollection <UserInfoBriefViewCellModel>(users);
            }
            else
            {
                ZoneUsers = new ObservableCollection <UserInfoBriefViewCellModel>();
            }
            IsBusy = false;
        }