//https://docs.microsoft.com/en-us/uwp/api/windows.storage.storagefolder private async void New_PlayList_Click(object sender, RoutedEventArgs e) { NewPlayListDialog newPlayList = new NewPlayListDialog(); await newPlayList.ShowAsync(); if (newPlayList.result == null) { } else { StorageFolder newFolder = await currentFolder.CreateFolderAsync(newPlayList.result, CreationCollisionOption.FailIfExists); BuildPlaylists(); } }
private async void Rename_Playlist_Click(object sender, RoutedEventArgs e) { NewPlayListDialog newPlayList = new NewPlayListDialog(); await newPlayList.ShowAsync(); if (newPlayList.result == null) { } else { StorageFolder folder = await currentFolder.GetFolderAsync(playList.SelectedItem.ToString()); await folder.RenameAsync(newPlayList.result); BuildPlaylists(); } }
private async void rename_Video_Click(object sender, RoutedEventArgs e) { StorageFolder playlist = await currentFolder.GetFolderAsync(playList.SelectedItem.ToString()); StorageFile video = await playlist.GetFileAsync(videoList.SelectedItem.ToString() + ".mp4"); NewPlayListDialog rename = new NewPlayListDialog(); await rename.ShowAsync(); if (rename.result == null) { } else { await video.RenameAsync(rename.result + ".mp4"); } BuildVideoList(); }