public IEnumerable <string> GetAnimationDefinitions(string animationData) { var item = ProjectFiles.FirstOrDefault(x => x.Path == animationData); if (item != null) { return(GetAnimationData(item).AnimationDefinitions.Select(x => x.Name)); } return(null); }
public ReturnPackage GetReturnPackage() { var selectedProjectsIds = CellViewModel.ReturnSelectedProjectIds(); var selectedFiles = new List <ProjectFile>(); var pathToProjFile = PathToPrjFile(_returnPackage.ProjectLocation); _returnPackage.PathToPrjFile = pathToProjFile; foreach (var id in selectedProjectsIds) { var selectedFile = ProjectFiles.FirstOrDefault(file => file.Id == id); selectedFiles.Add(selectedFile); } _returnPackage.TargetFiles = selectedFiles; return(_returnPackage); }
public AnimationData GetAnimationData(string fileName) { var file = ProjectFiles.FirstOrDefault(x => x.Path == fileName); return(file != null?GetAnimationData(file) : null); }
/// <summary> /// Gets a project file by its path. /// </summary> /// <param name = "path">The path to search.</param> /// <param name = "useRelativePath">Indicates whether the specified path is a relative hint path or not.</param> public ProjectFileEntry GetProjectFile(string path, bool useRelativePath) { return(ProjectFiles.FirstOrDefault(x => (useRelativePath ? x.FilePath.GetRelativePath(x.ParentProject) : x.FilePath.FullPath).Equals(path, StringComparison.OrdinalIgnoreCase))); }