Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        public AnimationData GetAnimationData(string fileName)
        {
            var file = ProjectFiles.FirstOrDefault(x => x.Path == fileName);

            return(file != null?GetAnimationData(file) : null);
        }
Example #4
0
 /// <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)));
 }