void itemAddFolder_Click(object sender, System.Windows.RoutedEventArgs e) { InputBox dialog = new InputBox(); if ((bool)dialog.ShowDialog()) { Folder folder = new Folder(this) { Name = dialog.Content, Path = "/" + dialog.Content }; System.IO.Directory.CreateDirectory(Path + folder.Path); Items.Add(folder); Save(); ProjectManager.GetManager().ProjectUpdated(); } }
void itemAddFile_Click(object sender, System.Windows.RoutedEventArgs e) { InputBox dialog = new InputBox(); if ((bool)dialog.ShowDialog()) { Source file = new Source(this) { Name = dialog.Content, Path = "/" + dialog.Content + ".snl" }; System.IO.File.Create(Path + file.Path).Close(); Items.Add(file); Save(); ProjectManager.GetManager().ProjectUpdated(); } }