public void SetFolderName(string name) { var newPath = ParentPath.ConcatPath(name); // Update the non-folder objects within this folder: TreeModel.ModifyDisplayFolder(Table, Path, newPath, Culture); // Update the folder objects within this folder (so the tree does not need to be rebuilt): foreach (var f in ChildFolders) { f.SetDisplayFolder(newPath, Culture, false); } Path = newPath; }
public void SetDisplayFolder(string folder, Culture culture, bool applyToChildObjects) { var newPath = folder + (string.IsNullOrEmpty(folder) ? "" : "\\") + Name; if (applyToChildObjects) { TreeModel.ModifyDisplayFolder(Table, Path, newPath, culture); } foreach (var f in ChildFolders) { f.SetDisplayFolder(newPath, Culture, false); } Path = newPath; }