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(); }
private void создатьToolStripMenuItem_Click(object sender, EventArgs e) { FileNameText.Show(); }