private async void MoverPagina() { Int32.TryParse(localSettings.Values[mangaG.GetName()].ToString(), out int pagina); if (pagina < cantPag) { // var watch = System.Diagnostics.Stopwatch.StartNew(); if (await Clases.Functions.SiNoMensaje(("¿Desea continuar el capitulo en la página " + (pagina + 1) + "?")) == 1) { CargarPaginaFlipview(pagina); } // watch.Stop(); // Debug.WriteLine("Tiempo movimiento: " + watch.ElapsedMilliseconds); } }
protected async override void OnNavigatedTo(NavigationEventArgs e) { MangasG = new List <Manga>(); MakeInvisible(); List <Manga> Mangas = e.Parameter as List <Manga>; Manga manga = Mangas.ElementAt <Manga>(Mangas.ElementAt <Manga>(0).GetMangaActual()); if (localSettings.Values["readingDirection"].ToString() == "1") { flipView.FlowDirection = FlowDirection.RightToLeft; } else { flipView.FlowDirection = FlowDirection.LeftToRight; } if (localSettings.Values["readingDirection"].ToString() == "2") { flipView.ItemsPanel = Resources["vertical"] as ItemsPanelTemplate; } loading.IsActive = true; mangaG = manga; MangasG = Mangas; try { episodeG = await Clases.Functions.LoadEpisodeAsync(mangaG.GetEpisodes().ElementAt(mangaG.GetActual()).GetDirectory()); await Clases.Functions.CheckPagesNumber(episodeG); await CargarBitmap(-1, false); LoadFlipView(); if (localSettings.Values[mangaG.GetName()] != null && !localSettings.Values[mangaG.GetName()].ToString().Equals("0") && mangaG.GetActual() == mangaG.GetUltimoEpisodioLeido()) { MoverPagina(); } switch (localSettings.Values["AjusteImagen"].ToString()) { case "1": flipView.ItemTemplate = Resources["AjustarAncho"] as DataTemplate; break; case "2": flipView.ItemTemplate = Resources["AjustarAlto"] as DataTemplate; break; default: //opcion es 0 flipView.ItemTemplate = Resources["NoAjustar"] as DataTemplate; break; } ActualizarInfo(); CargarCBox(); loading.IsActive = false; sw.Start(); } catch (Exception) { loading.IsActive = false; var imageUriForlogo = new Uri("ms-appx:///Assets/Imagen.png"); BitmapImage image = new BitmapImage { UriSource = imageUriForlogo }; flipView.Items.Add(image); EpisodeConter.Visibility = Visibility.Visible; } }