private LibraryModel() { libraryTracer.Restart(); DatabaseManager.Current.Connect(); libraryTracer.Trace("Database Connected"); _playQueue = new PlayQueueModel(); libraryTracer.Trace("PlayQueueModel Created"); }
private LibraryViewModel() { perf.Restart(); LibraryModel.Current.Start(); perf.Trace("Model created"); LibraryModel.Current.AllSongs.CollectionChanged += HandleAllSongsCollectionChanged; LibraryModel.Current.Playlists.CollectionChanged += HandlePlaylistsCollectionChanged; LibraryModel.Current.Mixes.CollectionChanged += HandleMixCollectionChanged; LibraryModel.Current.AlbumCreated += HandleLibraryModelAlbumCreated; _playQueue = new PlayQueueViewModel(LibraryModel.Current.PlayQueue); perf.Trace("first pass load done"); }