private void SetDefaultsFileSaveFormat () { string[] additionalActions = { Catalog.GetString("Keep the format used on file open"), Catalog.GetString("Remember the last used format") }; SubtitleType fixedFormat = SubtitleType.Unknown; ConfigFileSaveFormatOption fileSaveFormatOption = Base.Config.PrefsDefaultsFileSaveFormatOption; if (fileSaveFormatOption == ConfigFileSaveFormatOption.Specific) { fixedFormat = Base.Config.PrefsDefaultsFileSaveFormatFixed; } fileSaveFormat = new SubtitleFormatComboBox(fileSaveFormatComboBox, fixedFormat, additionalActions); if (fileSaveFormatOption != ConfigFileSaveFormatOption.Specific) { fileSaveFormat.ActiveSelection = (int)fileSaveFormatOption; } fileSaveFormat.SelectionChanged += OnDefaultsFileSaveFormatChanged; }
private void InitFormatComboBox () { SubtitleType fixedSubtitleType = GetFixedSubtitleType(); ConfigFileSaveFormat formatConfig = Base.Config.PrefsDefaultsFileSaveFormat; if (formatConfig == ConfigFileSaveFormat.Fixed) { fixedSubtitleType = Base.Config.PrefsDefaultsFileSaveFormatFixed; } /* Check if fixed subtitle type has been correctly identified */ if (fixedSubtitleType == SubtitleType.Unknown) { fixedSubtitleType = SubtitleType.SubRip; } this.formatComboBoxComponent = new SubtitleFormatComboBox(subtitleFormatComboBox, fixedSubtitleType, null); }