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