private String GetFileFilters() { if (subtitlesManager.SupportedSubtitlesFormats.Count() == 0) { return(String.Empty); } var supportedSubtitlesFormats = subtitlesManager.SupportedSubtitlesFormats; var extensions = supportedSubtitlesFormats.SelectMany(format => format.CorrectExtensions).Distinct(); FileFilterBuilder builder = new FileFilterBuilder(); builder.AppendFileFormat(Resources.DscAllSupported, extensions); foreach (var supportedSubtitle in supportedSubtitlesFormats) { builder.AppendFileFormat(supportedSubtitle.Description, supportedSubtitle.CorrectExtensions); } return(builder.ToString()); }
private String GetFileFilters() { FileFilterBuilder builder = new FileFilterBuilder(); IEnumerable <SubtitlesFileFormat> supportedFormats = CreateCurrentFormatFirstSubtitlesFormatsCollection(); foreach (var supportedformat in supportedFormats) { builder.AppendFileFormat(supportedformat.Description, supportedformat.CorrectExtensions); } return(builder.ToString()); }