예제 #1
0
        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());
        }
예제 #2
0
        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());
        }