GetLanguages() public method

public GetLanguages ( ) : List
return List
 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);
 }
Example #2
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;
        }
Example #3
0
        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.DisplayError(new ErrorMessage() { DisplayMessage = "There was a problem loading the mkvmerge languages!", DisplayTitle = "Error.", Exception = ex, MethodNameWhereExceptionOccurred = MethodBase.GetCurrentMethod().Name });
            }
        }
        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");
            }
        }