private async void Button_Click_Library(object sender, RoutedEventArgs e) { playingMode = PlayingMode.MUSIC_LIBRARY; await AudioFileRetriever.RetreiveFilesInFolders(musicLibrary, folder); await AudioFileRetriever.RetrieveSongMetadata(musicLibrary, musicLibrarySongsMetaData); SetNewGridItemSource(musicLibrarySongsMetaData); dataGrid.SelectedIndex = currentPlayingSongMusicLibraryIndex; }
private async void Button_Click_Library(object sender, RoutedEventArgs e) { playingMode = PlayingMode.MUSIC_LIBRARY; await AudioFileRetriever.RetreiveFilesInFolders(musicLibrary, folder); await AudioFileRetriever.RetrieveSongMetadata(musicLibrary, musicLibrarySongsMetaData); if (musicLibrarySongsMetaData.Count == 0 || dataGrid.ItemsSource == null) { dataGrid.Columns.Clear(); } dataGrid.ItemsSource = musicLibrarySongsMetaData; dataGrid.SelectedIndex = currentPlayingSongMusicLibraryIndex; }
private async void OpenFolder_Click(object sender, RoutedEventArgs e) { playlistTracks.Clear(); playlistsongsMetaData.Clear(); picker = new FolderPicker(); picker.SuggestedStartLocation = PickerLocationId.Desktop; picker.FileTypeFilter.Add(".mp3"); var folder = await picker.PickSingleFolderAsync(); await AudioFileRetriever.RetreiveFilesInFolders(playlistTracks, folder); await AudioFileRetriever.RetrieveSongMetadata(playlistTracks, playlistsongsMetaData); SetNewGridItemSource(playlistsongsMetaData); }