Esempio n. 1
0
 public BookViewModel(int bookId)
 {
     bookModel              = new BookModel();
     isLoading              = true;
     selectChapterCommand   = null;
     selectedChapter        = null;
     selectedChapterContent = null;
     bookModel.OpenBookAsync(bookId).ContinueWith(epubBook => BookOpened(epubBook), TaskScheduler.FromCurrentSynchronizationContext());
 }
Esempio n. 2
0
 private void SelectChapter(ChapterViewModel chapterViewModel)
 {
     if (selectedChapter != null)
     {
         selectedChapter.IsSelected = false;
     }
     selectedChapter = chapterViewModel;
     selectedChapter.IsTreeItemExpanded = true;
     selectedChapter.IsSelected         = true;
     SelectedChapterContent             = new ChapterContentViewModel(selectedChapter.FilePath, selectedChapter.HtmlContent, images, styleSheets, fonts);
 }