public NadeSettingViewModel(INadeSetting setting) { DecreasePerFrame = setting.DecreasePerFrame; Max = setting.Max; AssignToSetting(setting); }
public NadeSettingViewModel(INadeSetting setting) { DecreasePerFrame = setting.DecreasePerFrame; Max = setting.Max; AssignToSetting(setting); }
private void AssignToSetting(INadeSetting setting) { PropertyChanged += (_, e) => { if(e.PropertyName == nameof(DecreasePerFrame)) { setting.DecreasePerFrame = DecreasePerFrame; } else if(e.PropertyName == nameof(Max)) { setting.Max = Max; } }; PropertyChangedEventManager.AddHandler(setting, OnModelPropertyChanged, string.Empty); }
private void AssignToSetting(INadeSetting setting) { PropertyChanged += (_, e) => { if (e.PropertyName == nameof(DecreasePerFrame)) { setting.DecreasePerFrame = DecreasePerFrame; } else if (e.PropertyName == nameof(Max)) { setting.Max = Max; } }; PropertyChangedEventManager.AddHandler(setting, OnModelPropertyChanged, string.Empty); }