public override void OnNavigatedTo(INavigationParameters parameters) { if (parameters.ContainsKey("manga")) { manga = parameters.GetValue <MangaFromModels>("manga"); GetManga(manga); GetCharacters(l_Id); GetStats(l_Id); GetNews(l_Id); } }
// --------------FUNCTIONS-------------- public async void GetManga(MangaFromModels manga) { L_Id = manga.L_Id; L_Title = manga.L_Name; L_Description = manga.L_Description; L_Chapters = manga.L_Chapters; L_Volumes = manga.L_Volumes; L_Score = manga.L_Score; MangaPictures pictures = await jikan.GetMangaPictures(l_Id); L_ImgPath = pictures.Pictures.First().Large; }
private async void OnMangaSelected(MangaFromModels manga) { if (manga == null) { return; } var p = new NavigationParameters(); p.Add("manga", manga); await NavigationService.NavigateAsync(nameof(MangaDetailsPage), p, true, true); }
private async void TopMangasInit() { IsBusy2 = true; MangaTop topMangaList = await jikan.GetMangaTop(); foreach (var listEntry in topMangaList.Top) { tempManga = new MangaFromModels(); tempManga.L_Id = listEntry.MalId; tempManga.L_ImgUrl = listEntry.ImageURL; tempManga.L_Name = listEntry.Title; if (listEntry.Score == null) { tempManga.L_Score = "--"; } else { tempManga.L_Score = Convert.ToString(listEntry.Score); } if (listEntry.Volumes == null) { tempManga.L_Volumes = "No"; } else { tempManga.L_Volumes = Convert.ToString(listEntry.Volumes); } tempManga.L_Chapters = "No"; tempManga.L_Description = "No discription :/"; TopMangas.Add(tempManga); if (listEntry.Score >= 8) { tempManga.L_ScoreTextColor = "LawnGreen"; } else if (listEntry.Score >= 5) { tempManga.L_ScoreTextColor = "Orange"; } else { tempManga.L_ScoreTextColor = "Red"; } } TopMangaLabel = "Best of the Best"; IsBusy2 = false; }