void HLSSettingsUI_Loaded(object sender, RoutedEventArgs e) { if (_data == null) _data = new HLSSettings(); this.DataContext = _data; _data.PropertyChanged += _data_PropertyChanged; this.cbxRates.ItemsSource = new List<RateDefinition>(){ new RateDefinition(){Description = "12x Reverse",Value=-12.0d}, new RateDefinition(){Description = "8x Reverse",Value=-8.0d}, new RateDefinition(){Description = "4x Reverse",Value=-4.0d}, new RateDefinition(){Description = "2x Reverse",Value=-2.0d}, new RateDefinition(){Description = "Zero",Value=0.0d}, new RateDefinition(){Description = "Half speed Forward",Value=0.5d}, new RateDefinition(){Description = "Normal",Value=1.0d}, new RateDefinition(){Description = "2x Forward",Value=2.0d}, new RateDefinition(){Description = "4x Forward",Value=4.0d}, new RateDefinition(){Description = "8x Forward",Value=8.0d}, new RateDefinition(){Description = "12x Forward",Value=12.0d}, }; this.cbxRates.SelectedIndex = 6; this.cbxMatchSegmentsUsing.ItemsSource = new List<SegmentMatchingCriterionDefinition>(){ new SegmentMatchingCriterionDefinition(){Value = SegmentMatchCriterion.SEQUENCENUMBER}, new SegmentMatchingCriterionDefinition(){Value = SegmentMatchCriterion.PROGRAMDATETIME}, }; this.cbxMatchSegmentsUsing.SelectedIndex = 0; this.cbxCCType.ItemsSource = new List<CCTypeDefinition>(){ new CCTypeDefinition(){Description = "608",Value=ClosedCaptionType.CC608Instream}, new CCTypeDefinition(){Description = "WebVTT",Value=ClosedCaptionType.WebVTTSidecar}, new CCTypeDefinition(){Description = "None",Value=ClosedCaptionType.None} }; this.cbxCCType.SelectedIndex = 1; cbxRates.SelectionChanged += cbxRates_SelectionChanged; cbxMatchSegmentsUsing.SelectionChanged += cbxMatchSegmentsUsing_SelectionChanged; cbxAvailableBitrates.SelectionChanged += cbxAvailableBitrates_SelectionChanged; cbxCCType.SelectionChanged += cbxCCType_SelectionChanged; }
void HLSSettingsUI_Loaded(object sender, RoutedEventArgs e) { if (_data == null) { _data = new HLSSettings(); } this.DataContext = _data; _data.PropertyChanged += _data_PropertyChanged; this.cbxRates.ItemsSource = new List <RateDefinition>() { new RateDefinition() { Description = "12x Reverse", Value = -12.0d }, new RateDefinition() { Description = "8x Reverse", Value = -8.0d }, new RateDefinition() { Description = "4x Reverse", Value = -4.0d }, new RateDefinition() { Description = "2x Reverse", Value = -2.0d }, new RateDefinition() { Description = "Zero", Value = 0.0d }, new RateDefinition() { Description = "Half speed Forward", Value = 0.5d }, new RateDefinition() { Description = "Normal", Value = 1.0d }, new RateDefinition() { Description = "2x Forward", Value = 2.0d }, new RateDefinition() { Description = "4x Forward", Value = 4.0d }, new RateDefinition() { Description = "8x Forward", Value = 8.0d }, new RateDefinition() { Description = "12x Forward", Value = 12.0d }, }; this.cbxRates.SelectedIndex = 6; this.cbxMatchSegmentsUsing.ItemsSource = new List <SegmentMatchingCriterionDefinition>() { new SegmentMatchingCriterionDefinition() { Value = SegmentMatchCriterion.SEQUENCENUMBER }, new SegmentMatchingCriterionDefinition() { Value = SegmentMatchCriterion.PROGRAMDATETIME }, }; this.cbxMatchSegmentsUsing.SelectedIndex = 0; this.cbxCCType.ItemsSource = new List <CCTypeDefinition>() { new CCTypeDefinition() { Description = "608", Value = ClosedCaptionType.CC608Instream }, new CCTypeDefinition() { Description = "WebVTT", Value = ClosedCaptionType.WebVTTSidecar }, new CCTypeDefinition() { Description = "None", Value = ClosedCaptionType.None } }; this.cbxCCType.SelectedIndex = 1; cbxRates.SelectionChanged += cbxRates_SelectionChanged; cbxMatchSegmentsUsing.SelectionChanged += cbxMatchSegmentsUsing_SelectionChanged; cbxAvailableBitrates.SelectionChanged += cbxAvailableBitrates_SelectionChanged; cbxCCType.SelectionChanged += cbxCCType_SelectionChanged; }