public static string SetupAudioCodec(ComboBox comboBox) { List <ComboBoxData> audioCodecList = new List <ComboBoxData>(); audioCodecList.Add(new ComboBoxData() { DataName = "AC3", DataValueString = "ac3" }); audioCodecList.Add(new ComboBoxData() { DataName = "AAC", DataValueString = "aac" }); audioCodecList.Add(new ComboBoxData() { DataName = "AAC, AC3", DataValueString = "aac,ac3" }); comboBox.ItemsSource = audioCodecList; AppSettings settings = new AppSettings(); string selectedAudioCodec = settings.GetAppSettingString("audio_codec"); if (string.IsNullOrWhiteSpace(selectedAudioCodec)) { selectedAudioCodec = "aac,ac3"; } comboBox.SelectedItem = audioCodecList[GetSelectedStringItem(audioCodecList, selectedAudioCodec)]; return(selectedAudioCodec); }
public static string SetupEnableStreamCopy(ComboBox comboBox) { List <ComboBoxData> enableStreamCopyList = new List <ComboBoxData>(); enableStreamCopyList.Add(new ComboBoxData() { DataName = "YES", DataValueString = "true" }); enableStreamCopyList.Add(new ComboBoxData() { DataName = "NO", DataValueString = "false" }); comboBox.ItemsSource = enableStreamCopyList; AppSettings settings = new AppSettings(); string selectedEnableStreamCopy = settings.GetAppSettingString("stream_copy"); if (string.IsNullOrWhiteSpace(selectedEnableStreamCopy)) { selectedEnableStreamCopy = "true"; } comboBox.SelectedItem = enableStreamCopyList[GetSelectedStringItem(enableStreamCopyList, selectedEnableStreamCopy)]; return(selectedEnableStreamCopy); }
public static string SetupEnableStreamCopy(ComboBox comboBox) { List<ComboBoxData> enableStreamCopyList = new List<ComboBoxData>(); enableStreamCopyList.Add(new ComboBoxData() { DataName = "YES", DataValueString = "true" }); enableStreamCopyList.Add(new ComboBoxData() { DataName = "NO", DataValueString = "false" }); comboBox.ItemsSource = enableStreamCopyList; AppSettings settings = new AppSettings(); string selectedEnableStreamCopy = settings.GetAppSettingString("stream_copy"); if (string.IsNullOrWhiteSpace(selectedEnableStreamCopy)) { selectedEnableStreamCopy = "true"; } comboBox.SelectedItem = enableStreamCopyList[GetSelectedStringItem(enableStreamCopyList, selectedEnableStreamCopy)]; return selectedEnableStreamCopy; }
public static string SetupAudioCodec(ComboBox comboBox) { List<ComboBoxData> audioCodecList = new List<ComboBoxData>(); audioCodecList.Add(new ComboBoxData() { DataName = "AC3", DataValueString = "ac3" }); audioCodecList.Add(new ComboBoxData() { DataName = "AAC", DataValueString = "aac" }); audioCodecList.Add(new ComboBoxData() { DataName = "AAC, AC3", DataValueString = "aac,ac3" }); comboBox.ItemsSource = audioCodecList; AppSettings settings = new AppSettings(); string selectedAudioCodec = settings.GetAppSettingString("audio_codec"); if (string.IsNullOrWhiteSpace(selectedAudioCodec)) { selectedAudioCodec = "aac,ac3"; } comboBox.SelectedItem = audioCodecList[GetSelectedStringItem(audioCodecList, selectedAudioCodec)]; return selectedAudioCodec; }