Пример #1
0
        protected override async void OnViewReady(object view)
        {
            switch (ImportType)
            {
            case ImportType.File:
                var importedBook = await _bookManager.ImportBook();

                ImportedBooks.Add(importedBook);
                break;

            case ImportType.Folder:
                var importedBooks = await _bookManager.ImportBooks();

                ImportedBooks.AddRange(importedBooks);
                break;
            }

            NotifyOfPropertyChange(nameof(ImportedBooks));
            ImportingProgressVisibility = false;
        }
Пример #2
0
        private async void GoToLibrary()
        {
            await _eventAggregator.PublishOnUIThreadAsync(new Message <IEnumerable <Book> >(ImportedBooks.Where(x => x.IsImported)));

            _navigationService.GoBack();
        }