mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
Removed AudioEncoderSettings/AudioDecoderSettings classes, all of their functionality is now in IAudioEncoderSettings/IAudioDecoderSettings interfaces.
This commit is contained in:
@@ -8,7 +8,7 @@ namespace CUETools.Codecs
|
||||
public class AudioDecoderSettingsViewModel : INotifyPropertyChanged
|
||||
{
|
||||
[JsonProperty]
|
||||
public AudioDecoderSettings Settings = null;
|
||||
public IAudioDecoderSettings Settings = null;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CUETools.Codecs
|
||||
{
|
||||
}
|
||||
|
||||
public AudioDecoderSettingsViewModel(AudioDecoderSettings settings)
|
||||
public AudioDecoderSettingsViewModel(IAudioDecoderSettings settings)
|
||||
{
|
||||
this.Settings = settings;
|
||||
}
|
||||
@@ -62,21 +62,13 @@ namespace CUETools.Codecs
|
||||
}
|
||||
}
|
||||
|
||||
public bool Lossless
|
||||
{
|
||||
get => true;
|
||||
set {
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => Settings.Name;
|
||||
set
|
||||
{
|
||||
if (Settings is CommandLine.DecoderSettings)
|
||||
(Settings as CommandLine.DecoderSettings).name = value;
|
||||
(Settings as CommandLine.DecoderSettings).Name = value;
|
||||
else throw new InvalidOperationException();
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Name"));
|
||||
}
|
||||
@@ -88,7 +80,7 @@ namespace CUETools.Codecs
|
||||
set
|
||||
{
|
||||
if (Settings is CommandLine.DecoderSettings)
|
||||
(Settings as CommandLine.DecoderSettings).extension = value;
|
||||
(Settings as CommandLine.DecoderSettings).Extension = value;
|
||||
else throw new InvalidOperationException();
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Extension"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user