private void MimRemovePlaylist_Click(object sender, RoutedEventArgs e) { IPlaylist playlist = FrameworkUtils.GetDataContext <IPlaylist>(sender); IAudioService service = viewModel.Service.AudioService; if (service.CurrentPlaylist == playlist) { service.CurrentPlaylist = service.GetAllPlaylists().Where(p => p != playlist).Any() ? service.GetAllPlaylists().Next(playlist).next : null; } if (playlist is ISourcePlaylist) { service.SourcePlaylists.Remove((ISourcePlaylist)playlist); } else { service.Playlists.Remove(playlist); } }
private void MimRemixSongs_Click(object sender, RoutedEventArgs e) { IPlaylist playlist = FrameworkUtils.GetDataContext <IPlaylist>(sender); playlist.Songs = playlist.Songs.Shuffle().ToArray(); }
private async void MimReloadSongs_Click(object sender, RoutedEventArgs e) { await FrameworkUtils.GetDataContext <ISourcePlaylist>(sender).Reload(); }