public MusicDataManager() { _databaseFile = new FileInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Hurricane", "database.sqlite")); Images = new ImagesProvider(); Artists = new ArtistProvider(Images); Albums = new AlbumsProvider(Artists); Tracks = new TrackProvider(Artists, Images, Albums); Playlists = new PlaylistProvider(Tracks); UserData = new UserDataProvider(); LastfmApi = new LastfmApi(Artists); MusicManager = new MusicManager(); MusicManager.TrackChanged += MusicManager_TrackChanged; MusicManager.NewTrackOpened += MusicManager_NewTrackOpened; MusicStreamingPluginManager = new MusicStreamingPluginManager(); }
public ViewManager(PlaylistProvider playlistProvider) { ViewItems = new ObservableCollection<ISideListItem> { new HomeView(), new CollectionView(), new ChartsView(), new QueueView(), new HistoryView() }; playlistProvider.PlaylistAdded += PlaylistProvider_PlaylistAdded; playlistProvider.PlaylistRemoved += PlaylistProvider_PlaylistRemoved; foreach (var userPlaylist in playlistProvider.Playlists) ViewItems.Add(new PlaylistView(userPlaylist)); ViewSource = CollectionViewSource.GetDefaultView(ViewItems); ViewSource.GroupDescriptions.Add(new PropertyGroupDescription("ViewCategorie")); }