private void Configuration_ConfigChanged(object sender, ConfigEventArgs e) { if (e.Config != ConfigEventArgs.Configs.LibraryPath) { return; } SongCollector.Stop(); ArtistCollection.GetMainCollection().Clear(); AlbumCollection.GetMainCollection().Clear(); SongCollection.GetMainCollection().Clear(); SongCollector.Start(); }
public Form1() { InitializeComponent(); songlist.Source = SongCollection.GetMainCollection(); albumGrid.Source = AlbumCollection.GetMainCollection(); artistGrid.Source = ArtistCollection.GetMainCollection(); Configuration.ConfigChanged += Configuration_ConfigChanged; InitSearch(); Playlist.InitPlaylist(); //Fetch all the songs SongCollector.Start(); }