public void AddParent(RowInfo info,int depth) { while (depth > 0) { depth--; location = (MockFolderMediaLocation)location.Parent; } AddSibling(info); }
public void AddSibling(RowInfo info) { MockMediaLocation newLocation; if (info.IsFolder) { newLocation = new MockFolderMediaLocation(); } else { newLocation = new MockMediaLocation(); } if (location.Path.Length > 0) { newLocation.Path = location.Path + "\\" + info.Path; } else { newLocation.Path = info.Path; } newLocation.Parent = this.location; location.Children.Add(newLocation); }
public void AddChild(RowInfo info) { location = (MockFolderMediaLocation)location.Children.Last(); AddSibling(info); }