private void MenuCreateFolderClick(object sender, EventArgs e) { // let's get a name for the new folder var inputDialog = new InputDialog(); var folderName = inputDialog.InputBox("Enter a name for a new folder:", "Create folder", string.Empty); if (!string.IsNullOrEmpty(folderName)) { // let's run the backgroundworker for renaming an item boxWorking.Visible = true; lblError.Visible = false; lstItems.Enabled = false; treeFolders.Enabled = false; DisableActions(); // let's create a new folder with the given name var arguments = new object[] { folderName }; BgWorkerCreateFolder.RunWorkerAsync(arguments); } }
private void RenameEntry(Document docEntry) { // let's get a new name var inputDialog = new InputDialog(); var newTitle = inputDialog.InputBox("Enter a new name for '" + docEntry.Title + "':", "Rename", docEntry.Title); if (!string.IsNullOrEmpty(newTitle)) { // let's run the backgroundworker for renaming an item boxWorking.Visible = true; lblError.Visible = false; lstItems.Enabled = false; treeFolders.Enabled = false; DisableActions(); // let's get the documentId and rename the document var arguments = new object[] { docEntry.ResourceId, newTitle, docEntry.Type }; BgWorkerRenameEntry.RunWorkerAsync(arguments); } }