예제 #1
0
 public PropertyChangedViewModelActionItem(string name, object container, IEnumerable <IDirtiableViewModel> dirtiables, string propertyName, object previousValue)
     : base(name, dirtiables)
 {
     if (propertyName == null)
     {
         throw new ArgumentNullException("propertyName");
     }
     innerActionItem = new PropertyChangedActionItem(propertyName, container, previousValue);
 }
예제 #2
0
        private void UpdateValue(object newValue)
        {
            var  oldValue = value;
            bool changed  = !Equals(oldValue, newValue);

            if (changed && ShouldNotify && !Profile.IsDiscarding)
            {
                var actionItem = new PropertyChangedActionItem("Changed value", "Value", this, oldValue, Enumerable.Empty <IDirtiable>(), true);
                Profile.ActionStack.Add(actionItem);
                Profile.NotifyEntryChanged(Name);
            }
            value = newValue;
        }