public void mkvmergelanguageservice_can_get_languages_test() { //given IJsonSerializationService <ISOLanguageCodeCollection> jsonSerializationService = new JsonSerializationService <ISOLanguageCodeCollection>(); IMKVMergeLanguageService service = new MKVMergeLanguageService(jsonSerializationService); //when var languages = service.GetLanguages(); //then languages.Count().Should().BeGreaterThan(0); }
private void LoadMKVLanguageDropDownBoxes() { IJsonSerializationService <ISOLanguageCodeCollection> jsonSerializationService = new JsonSerializationService <ISOLanguageCodeCollection>(); IMKVMergeLanguageService service = new MKVMergeLanguageService(jsonSerializationService); foreach (MKVMergeLanguageItem item in service.GetLanguages()) { _bindingListSubtitlesMKVMergeDefaultSettingsLanguage.Add(item); _bindingListAudioMKVMergeDefaultSettingsLanguage.Add(item); } bsAudioMKVMergeDefaultSettingsLanguage.DataSource = _bindingListAudioMKVMergeDefaultSettingsLanguage; _bindingListAudioMKVMergeDefaultSettingsLanguage.AllowEdit = false; bsSubtitlesMKVMergeDefaultSettingsLanguage.DataSource = _bindingListSubtitlesMKVMergeDefaultSettingsLanguage; _bindingListSubtitlesMKVMergeDefaultSettingsLanguage.AllowEdit = false; }
private void LoadMKVMergeLangugeItemsDropDown() { IJsonSerializationService <ISOLanguageCodeCollection> jsonSerializationService = new JsonSerializationService <ISOLanguageCodeCollection>(); IMKVMergeLanguageService service = new MKVMergeLanguageService(jsonSerializationService); foreach (MKVMergeLanguageItem item in service.GetLanguages()) { _bindingListMKVMergeLanguageItem.Add(item); } bsMKVMergeLanguageItem.DataSource = _bindingListMKVMergeLanguageItem; _bindingListMKVMergeLanguageItem.AllowEdit = false; if (_isAdd) { _currentMKVMergeItem.Language = service.GetLanguageByName("undetermined"); } }
private void LoadMKVMergeLangugeItemsDropDown() { try { IJsonSerializationService <ISOLanguageCodeCollection> jsonSerializationService = new JsonSerializationService <ISOLanguageCodeCollection>(); IMKVMergeLanguageService service = new MKVMergeLanguageService(jsonSerializationService); foreach (MKVMergeLanguageItem item in service.GetLanguages()) { _bindingListMKVMergeLanguageItem.Add(item); } bsMKVMergeLanguageItem.DataSource = _bindingListMKVMergeLanguageItem; _bindingListMKVMergeLanguageItem.AllowEdit = false; } catch (Exception ex) { _displayErrorMessageService.LogAndDisplayError(new ErrorMessage() { DisplayMessage = "There was a problem loading the mkvmerge languages!", DisplayTitle = "Error.", Exception = ex, MethodNameWhereExceptionOccurred = MethodBase.GetCurrentMethod().Name }); } }