void createFolder_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(selected)) { selected = pathCurrentExtension; } if (!Directory.Exists(selected)) { selected = Path.GetDirectoryName(selected); } EnterValueForm evf = new EnterValueForm("desired name"); if (evf.ShowDialog() == DialogResult.OK) { FS.CreateFoldersPsysicallyUnlessThere(Path.Combine(selected, evf.TextBox1.Text)); } }
private void CreateFileOfExtension(string selected, string p) { if (string.IsNullOrEmpty(selected)) { selected = pathCurrentExtension; } selected = FindOutSelectedFolder(selected); EnterValueForm evf = new EnterValueForm("filename without extension"); if (evf.ShowDialog() == DialogResult.OK) { string nazev = evf.TextBox1.Text; CreateFileOfExtension(selected, p, nazev); } }