Beispiel #1
0
 private void RegisterTrackingObject(IValidatableTrackingObject trackingObject)
 {
     if (!_trackingObjects.Contains(trackingObject))
     {
         _trackingObjects.Add(trackingObject);
         trackingObject.PropertyChanged += TrackingObjectPropertyChanged;
     }
 }
Beispiel #2
0
        private void RegisterTrackingObject(IValidatableTrackingObject trackingObject)
        {
            if (!_trackingObjects.Contains(trackingObject))
            {
                _trackingObjects.Add(trackingObject);
                trackingObject.PropertyChanged += (sender, args) =>
                {
                    if (args.PropertyName == nameof(IsChanged))
                    {
                        OnPropertyChanged(nameof(IsChanged));
                    }

                    if (args.PropertyName == nameof(IsValid))
                    {
                        OnPropertyChanged(nameof(IsValid));
                    }
                };
            }
        }
        private void RegisterTrackingObjects(IValidatableTrackingObject trackingObject)
        {
            if (_trackingObjects.Contains(trackingObject))
            {
                return;
            }

            _trackingObjects.Add(trackingObject);
            trackingObject.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == nameof(IsChanged))
                {
                    OnPropertyChanged(nameof(IsChanged));
                }
                else if (e.PropertyName == nameof(IsValid))
                {
                    OnPropertyChanged(nameof(IsValid));
                }
            };
        }