protected async override void OnAppearing()
        {
            try
            {
                var stores = await s_services.GetShops();

                foreach (var v in stores)
                {
                    PickerStore.Items.Add(v.Name + " ," + v.City);
                }
            }
            catch
            {
                await DisplayAlert("Network error", "You are not cennected toh network.", "OK");
            }
            base.OnAppearing();
        }
Пример #2
0
        protected override async void OnAppearing()
        {
            try
            {
                indication.IsRunning = true;
                var shops = await s_services.GetShops();

                storesListView.ItemsSource = shops;
                indication.IsRunning       = shops.Any();
            }
            catch
            {
                await DisplayAlert("Error", "Couldn't retreive the stores", "Ok");
            }
            finally
            {
                indication.IsRunning = false;
                indication.IsVisible = false;
            }
            base.OnAppearing();
        }