示例#1
0
        internal static void FillFirstPage(IEnumerable <BookViewModel> loadedSource)
        {
            var notAvailable = loadedSource.Where(x => x.FirstPage == null);

            using (var dou = new DataOperationUnit())
            {
                foreach (var book in notAvailable)
                {
                    BookLoading.Load(book, dou);
                }
            }
        }
示例#2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var book = value as BookViewModel;

            if (!book.ContentsRegistered)
            {
                Thread.Sleep(0);
            }
            if (!book.IsLoaded)
            {
                var task = Task.Run(() =>
                {
                    BookLoading.Load(book);
                });
                return(new TaskCompletionSource <object>(task));
            }
            return(null);
        }
 private void PrepareBookContents()
 {
     BookLoading.Load(Book);
     ContentsLoadTask.FillContentsWithImage(LibraryManager, Book);
 }