/// <summary> /// Initializes a new instance of the <see cref="FileInfo"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="itemPath">The item path.</param> /// <param name="projectName">Name of the project.</param> public FileInfo(ProjectItemInfo itemInfo, ProjectInfo projectInfo) { this.ProjectInfo = projectInfo; this.ItemInfo = itemInfo; Image image = Images.GetImages().GetIcon(this.FileType); this.NameInfo = new NameInfo(image, this.Name); }
/// <inheritdoc/> public override void Process(ProjectItem item, ProjectInfo projectInfo) { #region Process Files try { if (kindsToIgnore.Contains(item.Kind) == false) { // Attempt to get all of the files for (short i = 0; i < item.FileCount; i++) { ProjectItemInfo info = new ProjectItemInfo(item, i); if (!String.IsNullOrEmpty(info.Name) && !String.IsNullOrEmpty(info.Extension)) { this.files.Add(new FileInfo(info, projectInfo)); } } } } catch (Exception e) { Debug.WriteLine(e.ToString()); } #endregion // Process any sub-projects if (item.SubProject != null) { Process(item.SubProject); } // Process and sub-items if (item.ProjectItems != null) { foreach (ProjectItem subItem in item.ProjectItems) { Process(subItem, projectInfo); } } }