private async void NewFolderToolStripMenuItem_Click(object sender, EventArgs e) { var newFolderDialog = new OneDriveRequestInputDialog { FormTitle = "Create new folder" }; newFolderDialog.ShowDialog(this); if (newFolderDialog.DialogResult != DialogResult.OK) { return; } try { var newFolderItem = await _oneDriveApi.CreateFolder(CurrentMyOneDriveItem, newFolderDialog.InputValue); MessageBox.Show("Folder has been created", "New Folder", MessageBoxButtons.OK, MessageBoxIcon.Information); await LoadFolderItems(newFolderItem.Id); } catch (Exception) { MessageBox.Show("Folder could not be created", "New Folder", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private async void CreateFolderButton_Click(object sender, EventArgs e) { var data = await OneDriveApi.CreateFolder("", "Test"); JsonResultTextBox.Text = data.OriginalJson; }