VPet/VPet.Solution/ViewModels/SettingEditor/InteractiveSettingPageVM.cs

30 lines
860 B
C#
Raw Normal View History

2024-03-30 07:00:02 +00:00
using VPet.Solution.Models.SettingEditor;
2023-12-30 14:54:49 +00:00
2024-01-07 14:57:27 +00:00
namespace VPet.Solution.ViewModels.SettingEditor;
2023-12-30 14:54:49 +00:00
public class InteractiveSettingPageVM : ObservableClass<InteractiveSettingPageVM>
{
private InteractiveSettingModel _systemSetting;
public InteractiveSettingModel InteractiveSetting
{
get => _systemSetting;
set => SetProperty(ref _systemSetting, value);
}
public InteractiveSettingPageVM()
{
2024-01-07 14:57:27 +00:00
SettingWindowVM.Current.PropertyChangedX += Current_PropertyChangedX;
2023-12-30 14:54:49 +00:00
}
2024-01-07 14:57:27 +00:00
private void Current_PropertyChangedX(SettingWindowVM sender, PropertyChangedXEventArgs e)
2023-12-30 14:54:49 +00:00
{
2024-01-11 16:28:22 +00:00
if (
e.PropertyName == nameof(SettingWindowVM.CurrentSetting)
&& sender.CurrentSetting is not null
)
2023-12-30 14:54:49 +00:00
{
InteractiveSetting = sender.CurrentSetting.InteractiveSetting;
}
}
}