mirror of
https://github.com/LorisYounger/VPet.git
synced 2024-08-30 18:42:36 +00:00
33 lines
862 B
C#
33 lines
862 B
C#
using VPet.Solution.Models.SettingEditor;
|
|
|
|
namespace VPet.Solution.ViewModels.SettingEditor;
|
|
|
|
public class SystemSettingPageVM : ObservableClass<SystemSettingPageVM>
|
|
{
|
|
#region SystemSetting
|
|
|
|
private SystemSettingModel _systemSetting;
|
|
public SystemSettingModel SystemSetting
|
|
{
|
|
get => _systemSetting;
|
|
set => SetProperty(ref _systemSetting, value);
|
|
}
|
|
#endregion
|
|
|
|
public SystemSettingPageVM()
|
|
{
|
|
SettingWindowVM.Current.PropertyChangedX += Current_PropertyChangedX;
|
|
}
|
|
|
|
private void Current_PropertyChangedX(SettingWindowVM sender, PropertyChangedXEventArgs e)
|
|
{
|
|
if (
|
|
e.PropertyName == nameof(SettingWindowVM.CurrentSetting)
|
|
&& sender.CurrentSetting is not null
|
|
)
|
|
{
|
|
SystemSetting = sender.CurrentSetting.SystemSetting;
|
|
}
|
|
}
|
|
}
|