Esempio n. 1
0
 public BookmarkSearchResultDaraModel CreateBookmarkSearchDataModel(BookmarkModel bookmark, string searchQuery, string bookTitle = null)
 {
     var dataModel = new BookmarkSearchResultDaraModel();
     dataModel.BookmarkText = bookmark.Text;
     dataModel.SearchQuery = searchQuery;
     dataModel.BookId = bookmark.BookID;
     dataModel.TokenOffset = bookmark.TokenID;
     dataModel.BookTitle = bookTitle;
     dataModel.Color = new SolidColorBrush(ColorHelper.ToColor(bookmark.Color));
     return dataModel;
 }
 public void OnBookmarkClick(BookmarkSearchResultDaraModel itemDataModel)
 {
     _navigationService
         .UriFor<ReadPageViewModel>()
         .WithParam(vm => vm.BookId, itemDataModel.BookId)
         .WithParam(vm => vm.TokenOffset, itemDataModel.TokenOffset)
         .WithParam(vm => vm.CatalogId, CatalogId)
         .WithParam(vm => vm.CatalogBookItemKey, TransientStorage.Put(CatalogBookItemModel))
         .Navigate();
 }