public FolderListupPageViewModel(
            BookmarkManager bookmarkManager,
            ImageCollectionManager imageCollectionManager,
            SourceStorageItemsRepository sourceStorageItemsRepository,
            PathReferenceCountManager PathReferenceCountManager,
            SecondaryTileManager secondaryTileManager,
            FolderLastIntractItemManager folderLastIntractItemManager,
            FolderListingSettings folderListingSettings,
            OpenPageCommand openPageCommand,
            OpenFolderItemCommand openFolderItemCommand,
            OpenImageViewerCommand openImageViewerCommand,
            OpenFolderListupCommand openFolderListupCommand,
            OpenWithExplorerCommand openWithExplorerCommand,
            SecondaryTileAddCommand secondaryTileAddCommand,
            SecondaryTileRemoveCommand secondaryTileRemoveCommand
            )
        {
            _bookmarkManager              = bookmarkManager;
            _imageCollectionManager       = imageCollectionManager;
            _sourceStorageItemsRepository = sourceStorageItemsRepository;
            _PathReferenceCountManager    = PathReferenceCountManager;
            SecondaryTileManager          = secondaryTileManager;
            _folderLastIntractItemManager = folderLastIntractItemManager;
            _folderListingSettings        = folderListingSettings;
            OpenPageCommand            = openPageCommand;
            OpenFolderItemCommand      = openFolderItemCommand;
            OpenImageViewerCommand     = openImageViewerCommand;
            OpenFolderListupCommand    = openFolderListupCommand;
            OpenWithExplorerCommand    = openWithExplorerCommand;
            SecondaryTileAddCommand    = secondaryTileAddCommand;
            SecondaryTileRemoveCommand = secondaryTileRemoveCommand;
            FolderItems      = new ObservableCollection <StorageItemViewModel>();
            ArchiveFileItems = new ObservableCollection <StorageItemViewModel>();
            EBookFileItems   = new ObservableCollection <StorageItemViewModel>();
            ImageFileItems   = new ObservableCollection <StorageItemViewModel>();

            FileItemsView        = new AdvancedCollectionView(ImageFileItems);
            SelectedFileSortType = new ReactivePropertySlim <FileSortType>(FileSortType.TitleAscending);



            FileDisplayMode       = _folderListingSettings.ToReactivePropertyAsSynchronized(x => x.FileDisplayMode);
            FolderLastIntractItem = new ReactivePropertySlim <StorageItemViewModel>();
            ImageLastIntractItem  = new ReactivePropertySlim <int>();

            /*
             * _currentQueryOptions = Observable.CombineLatest(
             *  SelectedFolderViewFirstSort,
             *  (queryType, sort) => (queryType, sort)
             *  )
             *  .Select(_ =>
             *  {
             *      var options = new QueryOptions();
             *      options.FolderDepth = FolderDepth.Shallow;
             *      options.SetPropertyPrefetch(Windows.Storage.FileProperties.PropertyPrefetchOptions.ImageProperties, Enumerable.Empty<string>());
             *      return options;
             *  })
             *  .ToReadOnlyReactivePropertySlim();
             */
        }
Ejemplo n.º 2
0
 public void Setup()
 {
     _collectionManager = new ImageCollectionManager("en");
     _collectionManager.FindAndLoadCollections(new[] { _artOfReadingFolder, _bobCollectionFolder, _sallyCollectionFolder });
 }