コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: SettingsForm.cs プロジェクト: adziabadzia/BatchGuy
        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;
        }
コード例 #3
0
        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");
            }
        }
コード例 #4
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.LogAndDisplayError(new ErrorMessage()
                {
                    DisplayMessage = "There was a problem loading the mkvmerge languages!", DisplayTitle = "Error.", Exception = ex, MethodNameWhereExceptionOccurred = MethodBase.GetCurrentMethod().Name
                });
            }
        }