public override async void Start() { try { using (_userDialogs.Loading("Loading")) { var result = await _api.GetAllMainCat(); Cats = result.Data; } } catch (Exception) { await _userDialogs.AlertAsync(Mvx.IoCProvider.Resolve <ILocalizeService>().Translate("Error"), Mvx.IoCProvider.Resolve <ILocalizeService>().Translate("Error"), Mvx.IoCProvider.Resolve <ILocalizeService>().Translate("Ok")); throw; } }
public override async void Start() { try { IsRefresh = false; var resultPost = await _apiPost.GetCustom(); var resultCat = await _apiCategory.GetAllMainCat(); var resultBanner = await _apiBanner.GetAll(); using (_userDialogs.Loading("Loading")) { BlogPosts = resultPost.Data; Banners = resultBanner.Data; Cats = resultCat.Data; } SingleImage = "http://loremflickr.com/600/600/nature?filename=simple.jpg"; // ImageCollection.Add(new CarouselModel("http://loremflickr.com/600/600/nature?filename=simple.jpg")); // ImageCollection.Add(new CarouselModel("http://loremflickr.com/600/600/nature?filename=simple.jpg")); // ImageCollection.Add(new CarouselModel("http://loremflickr.com/600/600/nature?filename=simple.jpg")); // ImageCollection.Add(new CarouselModel("http://loremflickr.com/600/600/nature?filename=simple.jpg")); // ImageCollection.Add(new CarouselModel("http://loremflickr.com/600/600/nature?filename=simple.jpg")); // ImageCollection.Add(new CarouselModel("http://loremflickr.com/600/600/nature?filename=simple.jpg")); // ImageCollection.Add(new CarouselModel("http://loremflickr.com/600/600/nature?filename=simple.jpg")); //await MaterialDialog.Instance.SnackbarAsync(message: Mvx.IoCProvider.Resolve<Services.ILocalizeService>().Translate("HelloMessage") + " " + Mvx.IoCProvider.Resolve<Services.ILocalizeService>().Translate("AppName")); } catch (Exception) { await _userDialogs.AlertAsync(Mvx.IoCProvider.Resolve <ILocalizeService>().Translate("Error"), Mvx.IoCProvider.Resolve <ILocalizeService>().Translate("Error"), Mvx.IoCProvider.Resolve <ILocalizeService>().Translate("Ok")); } }