diff --git a/butterflow-ui/MainWindow.xaml b/butterflow-ui/MainWindow.xaml index 2f4feb0..77111ad 100644 --- a/butterflow-ui/MainWindow.xaml +++ b/butterflow-ui/MainWindow.xaml @@ -46,26 +46,26 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -73,10 +73,10 @@ - + - + @@ -85,10 +85,10 @@ - + - + diff --git a/butterflow-ui/MainWindow.xaml.cs b/butterflow-ui/MainWindow.xaml.cs index 1238680..972e4b8 100644 --- a/butterflow-ui/MainWindow.xaml.cs +++ b/butterflow-ui/MainWindow.xaml.cs @@ -23,6 +23,8 @@ namespace butterflow_ui { #region Properties + /// Gets or sets the butyterflow options configuration. + /// The options configuration. public OptionsConfiguration OptionsConfiguration { get; set; } = new OptionsConfiguration(); #endregion @@ -49,5 +51,19 @@ namespace butterflow_ui mediaPreview.Source = new Uri(ofd.FileName); } } + + /// Event handler. Called by PlaybackRate radio buttons for checked events. + /// Source of the event. + /// Routed event information. + private void PlaybackRateRadioButton_Checked(object sender, RoutedEventArgs e) + { + var typedSender = (RadioButton)sender; + + if(typedSender != null) + { + var tag = typedSender.Tag.ToString(); + this.OptionsConfiguration.PlaybackRate = tag; + } + } } } diff --git a/butterflow-ui/OptionsConfiguration.cs b/butterflow-ui/OptionsConfiguration.cs index d9531f9..ff14b80 100644 --- a/butterflow-ui/OptionsConfiguration.cs +++ b/butterflow-ui/OptionsConfiguration.cs @@ -24,6 +24,7 @@ namespace butterflow_ui private bool keepAudio; private int width; private int height; + private bool losslessQuality; #endregion @@ -91,6 +92,21 @@ namespace butterflow_ui } } + /// Gets or sets a value indicating whether the result is rendered in lossless quality. + /// True if lossless quality is selected, false if not. + public bool LosslessQuality + { + get + { + return this.losslessQuality; + } + set + { + this.losslessQuality = value; + OnPropertyChanged("LosslessQuality"); + } + } + #endregion #region Methods