public LoadSavedPuppeteerItemsDialog() { InitializeComponent(); //RelativePaths var dirInfo = new DirectoryInfo(RelativePaths.BoneAnimation); _fileInfos = dirInfo.GetFilesByExtension(FilesExtensions.SavedSkeleton, FilesExtensions.SavedAnimatedSkeleton); SavedFiles.ItemsSource = _fileInfos; }
private void AddScenesAndFolders(TreeViewItemViewModel parent, DirectoryInfo currentDirectory) { var fis = currentDirectory.GetFilesByExtension(FilesExtensions.SceneSavedModel); foreach (var fi in fis) { var svm = new SceneViewModel(parent, _nodeAddCB, fi.Name, fi.FullName); parent.Children.Add(svm); } var childDirectories = currentDirectory.GetDirectories(); foreach (var di in childDirectories) { var folder = new FolderViewModel(parent, _nodeAddCB, di.Name, di.FullName, "Scenes"); parent.Children.Add(folder); AddScenesAndFolders(folder, di); } }