2023-12-30 14:54:49 +00:00
|
|
|
|
using HKW.HKWUtils.Observable;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using VPet.Solution.Models;
|
2024-01-07 14:57:27 +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 GraphicsSettingPageVM : ObservableClass<GraphicsSettingPageVM>
|
|
|
|
|
{
|
|
|
|
|
private GraphicsSettingModel _graphicsSetting;
|
|
|
|
|
public GraphicsSettingModel GraphicsSetting
|
|
|
|
|
{
|
|
|
|
|
get => _graphicsSetting;
|
|
|
|
|
set => SetProperty(ref _graphicsSetting, value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public GraphicsSettingPageVM()
|
|
|
|
|
{
|
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-09 15:22:25 +00:00
|
|
|
|
if (
|
|
|
|
|
e.PropertyName == nameof(SettingWindowVM.CurrentSetting)
|
|
|
|
|
&& sender.CurrentSetting is not null
|
|
|
|
|
)
|
2023-12-30 14:54:49 +00:00
|
|
|
|
{
|
|
|
|
|
GraphicsSetting = sender.CurrentSetting.GraphicsSetting;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|