public BookInfoPageViewModel( IBookRepository bookService, DownloadController downloadController, IEventAggregator eventAggregator, IBookmarkRepository bookmarkRepository, INavigationService navigationService, SharingDataModel sharingDataModel, IBusyOverlayManager busyOverlay, ICatalogRepository catalogRepository, IAcquisitionServiceFactory acquisitionServiceFactory, INotificationsService notificationsService, CatalogController catalogController, IDownloadsContainer container, IBookDownloadsRepository bookDownloadsRepository) { SharingDataModel = sharingDataModel; _bookService = bookService; _downloadController = downloadController; _bookmarkRepository = bookmarkRepository; _navigationService = navigationService; _busyOverlay = busyOverlay; _catalogRepository = catalogRepository; _acquisitionServiceFactory = acquisitionServiceFactory; _notificationsService = notificationsService; _catalogController = catalogController; _container = container; _bookDownloadsRepository = bookDownloadsRepository; eventAggregator.Subscribe(this); _busyOverlay.Content = UIStrings.BookInfoPage_Loading; _busyOverlay.Closable = true; }
public void ShareText(string text) { if (Book == null) { return; } SharingDataModel.ShareText(Book.Title, text); }
public ReadPageViewModel( INavigationService navigationService, ITileManager tileManager, IBookRepository bookRepository, SharingDataModel sharingDataModel, IBusyOverlayManager busyOverlay) { SharingDataModel = sharingDataModel; _navigationService = navigationService; _tileManager = tileManager; _bookRepository = bookRepository; _busyOverlay = busyOverlay; }
public async void ShareAsync() { if (!await SharingDataModel.ShowMessage()) { return; } _busyOverlay.Closable = true; _busyOverlay.Closing += Cancel; IsBusy = true; using (await _busyOverlay.Start(false)) { await SharingDataModel.UploadBook(Book); IsBusy = false; } }
public async void ShareAsync() { if (Book == null) { return; } if (!await SharingDataModel.ShowMessage()) { return; } _busyOverlay.Closable = true; _busyOverlay.Content = UIStrings.BookInfoPage_Loading; _busyOverlay.Closing += Cancel; using (await _busyOverlay.Start()) { await SharingDataModel.UploadBook(Book); } }
private void Cancel() { SharingDataModel.Cancel(); _busyOverlay.Closing -= Cancel; _busyOverlay.Stop(); }
private void Cancel() { SharingDataModel.Cancel(); StopOverlay(); }