public TvShowViewModel(ITvShowViewModelFactory viewModelFactory, ITvShowFileService tvShowFileService, ITvShowMetadataService metadataService, IBusyProvider busyProvider, IDialogViewer dialogViewer, IProgressManagerViewModel progressManager, IKeyDataStore keyDataStore, string path) : base(busyProvider, dialogViewer) { _viewModelFactory = viewModelFactory; _tvShowFileService = tvShowFileService; _metadataService = metadataService; _busyProvider = busyProvider; Title = new RequiredPropertyDecorator <string>(new StringCachedPropertyDecorator(keyDataStore, path)); Title.PropertyChanged += TitleValueChanged; Path = path; Selection = viewModelFactory.GetTvShowSelection(this); RefreshCommand = new RefreshMetadataCommand(this); UpdateCommand = new UpdateMetadataCommand(this, progressManager, busyProvider); SaveCommand = new SaveMetadataCommand(this); DeleteCommand = new DeleteMetadataCommand(this); Images = viewModelFactory.GetTvShowImages(this, path); ActorManager = viewModelFactory.GetActorManager(path, () => OnPropertyChanged("ActorManager")); Genres = new DashDelimitedCollectionViewModel <string>(s => s); // We need to set a "dummy" item in the collection for an arrow to appear in the TreeView since we're lazy-loading the items under it Children.Add(_viewModelFactory.GetSeason(this, "dummy")); }
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 ArtistViewModel(IArtistMetadataService metadataService, IMusicViewModelFactory viewModelFactory, IMusicFileService musicFileService, IMusicImageUpdater imageUpdater, IProgressManagerViewModel progressManager, IBusyProvider busyProvider, IDialogViewer dialogViewer, IKeyDataStore keyDataStore, string path) : base(busyProvider, dialogViewer, viewModelFactory.GetAlbum("dummy", null)) { _metadataService = metadataService; _viewModelFactory = viewModelFactory; _musicFileService = musicFileService; _busyProvider = busyProvider; Name = new RequiredPropertyDecorator <string>(new StringCachedPropertyDecorator(keyDataStore, path)); Path = path; Fanart = viewModelFactory.GetImage(true, new ArtistFanartImageStrategy(imageUpdater, this)); Selection = viewModelFactory.GetArtistSelection(this); Genres = new DashDelimitedCollectionViewModel <string>(s => s); Moods = new DashDelimitedCollectionViewModel <string>(s => s); Styles = new DashDelimitedCollectionViewModel <string>(s => s); YearsActive = new DashDelimitedCollectionViewModel <int>(int.Parse); RefreshCommand = new RefreshMetadataCommand(this); UpdateCommand = new UpdateMetadataCommand(this, progressManager, busyProvider); SaveCommand = new SaveMetadataCommand(this); DeleteCommand = new DeleteMetadataCommand(this); }