Exemple #1
0
        protected async override void OnAppearing()
        {
            IsBusy = true;
            //brand
            using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Inicijalniziram.."))
            {
                //data storages get items
                addNewViewModel.additionalEquipment = await DataStoreAdditionalEquipment.GetItemAsync("0");

                addNewViewModel.counties = await DataStoreCounties.GetItemsAsync(false);

                addNewViewModel.towns = await DataStoreTowns.GetItemsAsync(false);

                addNewViewModel.brands = await DataStoreCarBrands.GetItemsAsync(false);

                addNewViewModel.models = await DataStoreCarModels.GetItemsAsync(false);

                addNewViewModel.SetUpStringLists();
            }

            IsBusy = false;
        }
Exemple #2
0
        protected async override void OnAppearing()
        {
            base.OnAppearing();
            IsBusy = true;
            if (viewModel.Items.Count == 0)
            {
                viewModel.LoadItemsCommand.Execute(null);
            }

            ItemsListView.EndRefresh();

            UserFavoriteAdsDataStore = DependencyService.Get <IDataStore <UserFavoriteAd> >() ?? new FavoritesDataStore();
            UserDataStore            = DependencyService.Get <IDataStore <FirebaseUser> >() ?? new UserDataStore();
            DataStoreCarBrands       = DependencyService.Get <IDataStore <CarBrand> >() ?? new BrandsDataStore();
            DataStoreCounties        = DependencyService.Get <IDataStore <County> >() ?? new CountiesDataStore();

            addNewViewModel.counties = await DataStoreCounties.GetItemsAsync(false);

            addNewViewModel.brands = await DataStoreCarBrands.GetItemsAsync(false);

            addNewViewModel.SetUpStringListsForFilter();
            IsBusy = false;
        }