private LogicFolderTreeViewItem Copy(LogicFolderTreeViewItem src, LogicFolderTreeViewItem dest) { if (src.LogicFolderInfo.IsFolder) { var newFolder = dest.LogicFolderInfo.AddFolder(src.LogicFolderInfo.Name); var newlftvi = CreateAndAdd(newFolder, dest); dest.Sort(); foreach (LogicFolderTreeViewItem childlftvi in src.Items) { Copy(childlftvi, newlftvi); } return(newlftvi); } else { var newScore = dest.LogicFolderInfo.AddScore(SongInformation.FindSongInformationByID(src.LogicFolderInfo.ScoreID), src.LogicFolderInfo.Name); var newlftvi = CreateAndAdd(newScore, dest); dest.Sort(); return(newlftvi); } }
private void RecursiveCopy(SongInfoTreeViewItem sitvi, LogicFolderTreeViewItem lftvi) { foreach (SongInfoTreeViewItem childsitvi in sitvi.Items) { if (!childsitvi.SongInformation.IsPPDSong) { var folder = lftvi.LogicFolderInfo.AddFolder(childsitvi.SongInformation.DirectoryName); var newlftvi = CreateAndAdd(folder, lftvi); RecursiveCopy(childsitvi, newlftvi); } else { var newinfo = lftvi.LogicFolderInfo.AddScore(childsitvi.SongInformation); CreateAndAdd(newinfo, lftvi); } } lftvi.Sort(); }