private void AddNewFile()
{
try
{
var path = projtree.SelectedNode as ExTreeNode;
if (path != null && path.Type == ProjectNodeType.Folder)
{
using (var util = new FolderUtils())
{
if (util.ShowDialog(this) != DialogResult.OK) return;
var file = Path.Combine(path.Name, util.FileName);
var node = new ExTreeNode(util.FileName, file, ProjectNodeType.File);
File.WriteAllText(file, "");
projtree.SelectedNode.Nodes.Add(node);
}
}
}
catch (Exception ex)
{
MessageBox.Show("There was an Error : " + ex.Message, "Project Manager", MessageBoxButtons.OK,
MessageBoxIcon.Exclamation);
}
}