public SearchViewModel(Common.Singletons.Library library, IMessenger messenger, ITrackCriteriaService trackCriteriaService, ITrackSearchService trackSearchService, IPlaylistsService repository, TrackContextMenuViewModel trackContextMenu, IPlayRequestHandler playRequestHandler) : base(TabType.Search, IconType.Search, "Library Search") { _library = library; _messenger = messenger; _repository = repository; _trackCriteriaService = trackCriteriaService; _trackSearchService = trackSearchService; _playRequestHandler = playRequestHandler; TrackContextMenu = trackContextMenu; Criteria = new ObservableCollection <CriteriaGroupViewModel>(); AddNewCriteriaGroupCommand = new RelayCommand(OnAddNewCriteriaGroup); SearchCommand = new RelayCommand(OnSearch); ClearCommand = new RelayCommand(OnClear); SaveAsCriteriaPlaylistCommand = new RelayCommand(OnSaveAsCriteriaPlaylist); SaveAsOrderedPlaylistCommand = new RelayCommand(OnSaveAsOrderedPlaylist); PlayCommand = new RelayCommand(OnPlay); EditCommand = new RelayCommand(OnEdit); RemoveGroupCommand = new RelayCommand <CriteriaGroupViewModel>(OnRemoveGroup); _library.Updated += OnLibraryUpdated; }
public CurrentTrackViewModel(IMessenger messenger, Common.Singletons.Library library) : base(TabType.CurrentTrack, IconType.Music, "Current Track") { _messenger = messenger; EditTrackCommand = new RelayCommand(OnEditTrack); library.Updated += OnLibraryUpdated; }
public PlaylistsViewModel(IPlaylistsService repository, Common.Singletons.Library library, IMessenger messenger, ITrackSearchService trackSearchService, IPlayRequestHandler playRequestHandler) : base(TabType.Playlists, IconType.ListUl, "Playlists") { _messenger = messenger; _repository = repository; OrderedPlaylists = new OrderedPlaylistsViewModel(this, _messenger, trackSearchService, _repository, playRequestHandler); CriteriaPlaylists = new CriteriaPlaylistsViewModel(this, messenger, trackSearchService, _repository, playRequestHandler); StandardPlaylists = new StandardPlaylistsViewModel(this, library, messenger, playRequestHandler, trackSearchService, _repository); }
public EditCriteriaPlaylistViewModel(IMessenger messenger, IPlaylistsService repository, ITrackSearchService trackSearchService, Common.Singletons.Library library, ITrackCriteriaService trackCriteriaService) : base(TabType.Playlists, IconType.Cog, "Edit Playlist", messenger, false) { _library = library; _messenger = messenger; _trackCriteriaService = trackCriteriaService; _trackSearchService = trackSearchService; _repository = repository; AddNewCriteriaGroupCommand = new RelayCommand(OnAddNewCriteriaGroup); PreviewResultsCommand = new RelayCommand(OnPreviewResults); RemoveGroupCommand = new RelayCommand <CriteriaGroupViewModel>(OnRemoveGroup); }
public CurrentPlaylistViewModel(IPlaylist playlist, Common.Singletons.Library library, TrackContextMenuViewModel trackContextMenu, IPlayRequestHandler playRequestHandler) : base(TabType.CurrentPlaylist, IconType.ListOl, "Current Playlist") { _playlist = playlist; _playRequestHandler = playRequestHandler; _playlist.ListUpdated += OnPlaylistUpdated; library.Updated += OnLibraryUpdated; PlayCommand = new RelayCommand(OnPlay); TrackContextMenu = trackContextMenu; }
public StandardPlaylistsViewModel(PlaylistsViewModel parent, Common.Singletons.Library library, IMessenger messenger, IPlayRequestHandler playRequestHandler, ITrackSearchService trackSearchService, IPlaylistsService repository) { _library = library; _messenger = messenger; _playRequestHandler = playRequestHandler; _trackSearchService = trackSearchService; _repository = repository; _parent = parent; PlayCommand = new RelayCommand <StandardFilterViewModel>(OnPlay); FavouriteCommand = new RelayCommand <StandardFilterViewModel>(OnFavourite); Filters = new ObservableCollection <StandardFilterViewModel>(); }
public LibraryViewModel(Common.Singletons.Library library, ILibrarySortingService librarySortingService, IPlayRequestHandler playRequestHandler, LibraryArtistViewModel artistViewModel, LibraryTracksViewModel tracksViewModel) : base(TabType.Library, IconType.Book, Resources.TabTitleLibrary) { _library = library; _librarySortingService = librarySortingService; _playRequestHandler = playRequestHandler; Artists = new List <Artist>(); ArtistViewModel = artistViewModel; TracksViewModel = tracksViewModel; ArtistTypeAlbum = true; ShuffleArtistCommand = new RelayCommand <Artist>(OnShuffleArtist); _library.Updated += OnLibraryUpdated; }
public EditTrackViewModel(Common.Singletons.Library library, IMessenger messenger, IAlbumInfoService webAlbumInfoService, ITrackUpdateService trackUpdateService, IImageProcessingService imageProcessingService, IWebBrowserService webBrowserService, IFileDialogService fileDialogService, ILyricsService lyricsService) : base(TabType.EditTrack, IconType.Edit, "Edit Track", messenger, false) { _library = library; _fileDialogService = fileDialogService; _imageProcessingService = imageProcessingService; _messenger = messenger; _trackUpdateService = trackUpdateService; _webAlbumInfoService = webAlbumInfoService; _webBrowserService = webBrowserService; _lyricsService = lyricsService; GetLyricsCommand = new RelayCommand(OnGetLyrics); LyricsWebSearchCommand = new RelayCommand(OnLyricsWebSearch); }
public ArtistViewModel(Common.Singletons.Library library, IArtistWebInfoService artistWebInfoService, IImageProcessingService imageProcessingService, IConfigSettings configSettings) : base(TabType.Artist, IconType.Users, "Artist") { _imageProcessingService = imageProcessingService; _library = library; _artistWebInfoService = artistWebInfoService; _configSettings = configSettings; ShowCurrentArtistCommand = new RelayCommand(ShowCurrentArtist); _similarArtists = new List <ArtistWebSimilarArtist>(); for (var i = 0; i < _configSettings.NumberOfSimilarArtistsToDisplay; i++) { _similarArtists.Add(new ArtistWebSimilarArtist()); } Tweets = new ObservableCollection <Tweet>(); }
public DashboardViewModel(ILibraryStatisticsService libraryStatisticsService, Common.Singletons.Library library, IPlayHistoryService playHistoryService) : base(TabType.Dashboard, IconType.Home, "Home") { LibraryStatsViewModel = new LibraryStatsViewModel(libraryStatisticsService); RecentTracksViewModel = new RecentTracksViewModel(playHistoryService); PlayHistoryViewModel = new WeeklyPlayHistoryViewModel(playHistoryService); library.Updated += Library_Updated; }