diff --git a/VPet.ModMaker/SimpleObservable/ObservableValue.cs b/VPet.ModMaker/SimpleObservable/ObservableValue.cs index d86be23..9fd2d4a 100644 --- a/VPet.ModMaker/SimpleObservable/ObservableValue.cs +++ b/VPet.ModMaker/SimpleObservable/ObservableValue.cs @@ -77,10 +77,10 @@ public class ObservableValue private bool NotifyPropertyChanging(T oldValue, T newValue) { PropertyChanging?.Invoke(this, new(nameof(Value))); - var cancel = false; // 若全部事件取消改变 则取消改变 - ValueChanging?.Invoke(this, new(oldValue, newValue)); - return cancel; + var args = new ValueChangingEventArgs(oldValue, newValue); + ValueChanging?.Invoke(this, args); + return args.Cancel; } ///