public void AddNewFile(JadeUtils.IO.IFileHandle fileHandle) { if (_data.HasItem(fileHandle.Path.Str)) { throw new Exception("Attempt to add duplicate file name to project."); } JadeCore.Project.FileItem item = new JadeCore.Project.FileItem(fileHandle); _data.OwningProject.AddItem(_data, item); AddChildFile(new File(this, item)); OnPropertyChanged("Children"); }
public File(TreeNodeBase parent, JadeCore.Project.FileItem file) : base(file.Path.FileName, parent) { _data = file; }