Пример #1
0
        private void переименоватьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var newFileName = "";

            FileNameText.Show();
            newFileName = FileNameText.Text;
            while (true)
            {
                try
                {
                    if (!isFile)
                    {
                        Directory.Move(filePath + currentFileName, filePath + "/" + newFileName);
                    }
                    else
                    {
                        File.Move(filePath + currentFileName, filePath + "/" + newFileName);
                    }
                    break;
                }
                catch (Exception)
                {
                    break;
                }
            }
            isFile = false;
            LoadFilesAndDirectories();
            FileNameText.Clear();
            FileNameText.Hide();
        }
Пример #2
0
 private void создатьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FileNameText.Show();
 }