2021-02-24 18:35:01 +00:00
|
|
|
|
using MassiveKnob.Plugin.CoreAudio.Base;
|
|
|
|
|
|
|
|
|
|
namespace MassiveKnob.Plugin.CoreAudio.SetMuted
|
|
|
|
|
{
|
|
|
|
|
public class DeviceSetMutedActionSettingsViewModel : BaseDeviceSettingsViewModel<DeviceSetMutedActionSettings>
|
|
|
|
|
{
|
|
|
|
|
// ReSharper disable UnusedMember.Global - used by WPF Binding
|
2021-02-28 12:55:47 +00:00
|
|
|
|
public bool ToggleTrue
|
2021-02-24 18:35:01 +00:00
|
|
|
|
{
|
|
|
|
|
get => Settings.Toggle;
|
|
|
|
|
set
|
|
|
|
|
{
|
2021-02-28 12:55:47 +00:00
|
|
|
|
if (!value)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (Settings.Toggle)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
Settings.Toggle = true;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool ToggleFalse
|
|
|
|
|
{
|
|
|
|
|
get => !Settings.Toggle;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (!value)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (!Settings.Toggle)
|
2021-02-24 18:35:01 +00:00
|
|
|
|
return;
|
|
|
|
|
|
2021-02-28 12:55:47 +00:00
|
|
|
|
Settings.Toggle = false;
|
2021-02-24 18:35:01 +00:00
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool SetInverted
|
|
|
|
|
{
|
|
|
|
|
get => Settings.SetInverted;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value == Settings.SetInverted)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
Settings.SetInverted = value;
|
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// ReSharper restore UnusedMember.Global
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ReSharper disable once SuggestBaseTypeForParameter - by design
|
|
|
|
|
public DeviceSetMutedActionSettingsViewModel(DeviceSetMutedActionSettings settings) : base(settings)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|