VPet/VPet.Solution/ViewModels/SettingEditor/InteractiveSettingPageVM.cs
2024-03-30 15:00:02 +08:00

30 lines
860 B
C#

using VPet.Solution.Models.SettingEditor;
namespace VPet.Solution.ViewModels.SettingEditor;
public class InteractiveSettingPageVM : ObservableClass<InteractiveSettingPageVM>
{
private InteractiveSettingModel _systemSetting;
public InteractiveSettingModel InteractiveSetting
{
get => _systemSetting;
set => SetProperty(ref _systemSetting, value);
}
public InteractiveSettingPageVM()
{
SettingWindowVM.Current.PropertyChangedX += Current_PropertyChangedX;
}
private void Current_PropertyChangedX(SettingWindowVM sender, PropertyChangedXEventArgs e)
{
if (
e.PropertyName == nameof(SettingWindowVM.CurrentSetting)
&& sender.CurrentSetting is not null
)
{
InteractiveSetting = sender.CurrentSetting.InteractiveSetting;
}
}
}