Ejemplo n.º 1
0
        public static string GetFolderName()
        {
            string   result = null;
            NameForm nf     = new NameForm();

            if (nf.ShowDialog() == DialogResult.OK)
            {
                result = nf.nameBox.Text;
            }
            nf.Dispose();
            return(result);
        }
Ejemplo n.º 2
0
        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);
        }