コード例 #1
0
ファイル: SettingsEntry.cs プロジェクト: h78hy78yhoi8j/xenko
 private void UpdateValue(object newValue)
 {
     var oldValue = value;
     bool changed = !Equals(oldValue, newValue);
     if (changed && ShouldNotify && !Profile.IsDiscarding)
     {
         var actionItem = new PropertyChangedActionItem("Value", this, oldValue, true);
         Profile.ActionStack.Add(actionItem);
         Profile.NotifyEntryChanged(Name);
     }
     value = newValue;
 }
コード例 #2
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);
 }