public static string GetFolderName() { string result = null; NameForm nf = new NameForm(); if (nf.ShowDialog() == DialogResult.OK) { result = nf.nameBox.Text; } nf.Dispose(); return(result); }
public static string RenameItem(string oldName, string title, string prompt) { string result = null; NameForm nf = new NameForm(); nf.Text = title; nf.nameLabel.Text = prompt; nf.nameBox.Text = oldName; if (nf.ShowDialog() == DialogResult.OK) { result = nf.nameBox.Text; } nf.Dispose(); return(result); }