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 SystemSettingPageVM : ObservableClass<SystemSettingPageVM>
|
|
|
|
|
{
|
2024-01-11 16:28:22 +00:00
|
|
|
|
#region SystemSetting
|
|
|
|
|
|
2023-12-30 14:54:49 +00:00
|
|
|
|
private SystemSettingModel _systemSetting;
|
|
|
|
|
public SystemSettingModel SystemSetting
|
|
|
|
|
{
|
|
|
|
|
get => _systemSetting;
|
|
|
|
|
set => SetProperty(ref _systemSetting, value);
|
|
|
|
|
}
|
2024-01-11 16:28:22 +00:00
|
|
|
|
#endregion
|
2023-12-30 14:54:49 +00:00
|
|
|
|
|
|
|
|
|
public SystemSettingPageVM()
|
|
|
|
|
{
|
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
|
|
|
|
{
|
|
|
|
|
SystemSetting = sender.CurrentSetting.SystemSetting;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|