Ejemplo n.º 1
0
 public async void OpenDetailScreen(ShelfTag x)
 {
     StartLoading();
     await Task.Run(()=>detailScreen.LoadData(x));
     ShelfGrid.Visibility = Visibility.Collapsed;
     detailScreen.Visibility = Visibility.Visible;
     EndLoading();
 }
Ejemplo n.º 2
0
 public void LoadData(ShelfTag item) //Load data offine here
 {
     App.book_dir = item.book_dir;
     using (StreamReader file = File.OpenText(item.book_dir + "\\detail.json"))
     {
         JsonSerializer serializer = new JsonSerializer();
         App.Items = (Root)serializer.Deserialize(file, typeof(Root));
     }
     page_numbers = App.Items.chapter_name.Count / chapter_limit + 1;
     page_index   = 1;
     this.Dispatcher.Invoke(() =>
     {
         LoadPaging(page_index);
         PagePanelReload();
     });
 }