Beispiel #1
0
        public AlbumViewModel(IMusicFileService musicFileService,
                              IAlbumMetadataService metadataService,
                              IMusicImageUpdater imageUpdater,
                              IMusicViewModelFactory viewModelFactory,
                              IBusyProvider busyProvider,
                              IDialogViewer dialogViewer,
                              IProgressManagerViewModel progressManager,
                              IKeyDataStore keyDataStore,
                              IArtistViewModel artistViewModel,
                              string path)
            : base(busyProvider, dialogViewer, viewModelFactory.GetTrack("dummy"))
        {
            _musicFileService = musicFileService;
            _metadataService  = metadataService;
            _viewModelFactory = viewModelFactory;
            _busyProvider     = busyProvider;
            _artistViewModel  = artistViewModel;
            Title             = new RequiredPropertyDecorator <string>(new StringCachedPropertyDecorator(keyDataStore, path));
            Path      = path;
            CoverArt  = viewModelFactory.GetImage(true, new AlbumCoverArtImageStrategy(imageUpdater, this));
            Selection = viewModelFactory.GetAlbumSelection(this);

            Genres = new DashDelimitedCollectionViewModel <string>(s => s);
            Moods  = new DashDelimitedCollectionViewModel <string>(s => s);
            Styles = new DashDelimitedCollectionViewModel <string>(s => s);
            Themes = new DashDelimitedCollectionViewModel <string>(s => s);

            RefreshCommand = new RefreshMetadataCommand(this);
            UpdateCommand  = new UpdateMetadataCommand(this, progressManager, busyProvider);
            SaveCommand    = new SaveMetadataCommand(this);
            DeleteCommand  = new DeleteMetadataCommand(this);
        }
 public AlbumSelectionViewModel(IAlbumMetadataService metadataService,
                                IMusicImageService imageService,
                                IBusyProvider busyProvider,
                                IAlbumViewModel albumViewModel)
     : base(busyProvider, albumViewModel.Title.OriginalValue)
 {
     _metadataService = metadataService;
     _imageService    = imageService;
     _albumViewModel  = albumViewModel;
 }
Beispiel #3
0
 public MusicViewModelFactory(IArtistMetadataService artistMetadataService,
                              IAlbumMetadataService albumMetadataService,
                              ISourceService sourceService,
                              IFileSystemService fileSystemService,
                              IMusicFileService musicFileService,
                              IMusicImageService imageService,
                              IMusicImageUpdater imageUpdater,
                              IBusyProvider busyProvider,
                              IKeyDataStore keyDataStore,
                              IProgressManagerViewModel progressManager,
                              IDialogViewer dialogViewer)
 {
     _artistMetadataService = artistMetadataService;
     _albumMetadataService  = albumMetadataService;
     _sourceService         = sourceService;
     _fileSystemService     = fileSystemService;
     _musicFileService      = musicFileService;
     _imageService          = imageService;
     _imageUpdater          = imageUpdater;
     _busyProvider          = busyProvider;
     _keyDataStore          = keyDataStore;
     _progressManager       = progressManager;
     _dialogViewer          = dialogViewer;
 }
 public MusicViewModelFactory(IArtistMetadataService artistMetadataService,
     IAlbumMetadataService albumMetadataService,
     ISourceService sourceService,
     IFileSystemService fileSystemService,
     IMusicFileService musicFileService,
     IMusicImageService imageService,
     IMusicImageUpdater imageUpdater,
     IBusyProvider busyProvider,
     IKeyDataStore keyDataStore,
     IProgressManagerViewModel progressManager,
     IDialogViewer dialogViewer)
 {
     _artistMetadataService = artistMetadataService;
     _albumMetadataService = albumMetadataService;
     _sourceService = sourceService;
     _fileSystemService = fileSystemService;
     _musicFileService = musicFileService;
     _imageService = imageService;
     _imageUpdater = imageUpdater;
     _busyProvider = busyProvider;
     _keyDataStore = keyDataStore;
     _progressManager = progressManager;
     _dialogViewer = dialogViewer;
 }