internal static FileDialogFilterBuilder GetProjectsFilter(ExtensionSettingsProjectCollection projectTypes) { FileDialogFilterBuilder builder; builder = new FileDialogFilterBuilder(); foreach (string projectType in projectTypes) { int endOfNamePosition; string projectName; string projectFilter; endOfNamePosition = projectType.IndexOf('|'); if (endOfNamePosition == -1) { projectName = projectType; projectFilter = projectType; } else { projectName = projectType.Substring(0, endOfNamePosition); projectFilter = projectType.Substring(endOfNamePosition + 1); } builder.Add(projectName, projectFilter); } builder.AddAllFiles(); return(builder); }
public FolderExclusionsDialog(ExtensionSettingsProjectCollection exclusions, ExtensionSettingsProjectCollection projectTypes) : this() { if (exclusions.Count != 0) { StringBuilder sb; sb = new StringBuilder(); foreach (string exclusion in exclusions) { sb.AppendLine(exclusion); } folderExclusionsTextBox.Text = sb.ToString(); } if (projectTypes.Count != 0) { var sb = new StringBuilder(); foreach (var projectType in projectTypes) { sb.AppendLine(projectType); } projectTypesTextBox.Text = sb.ToString(); } }
internal static string[] GetSearchMasks(ExtensionSettingsProjectCollection projectTypes) { return(GetSearchMasks(GetProjectsFilter(projectTypes).ToString())); }