// implement IChangeDataValue for undo/redo public void ChangeDataValue(ModelChangedEventArgs e, bool undo) { switch (e.PropertyName) { case "Color": this.Color = (String)e.GetValue(undo); break; default: throw new NotImplementedException("Socket change: " + e.ToString()); } }
override public void ChangeDataValue(ModelChangedEventArgs e, bool undo) { if (e == null) { return; } if (e.PropertyName == "IsDynamic") { this.IsDynamic = (bool)e.GetValue(undo); } else { base.ChangeDataValue(e, undo); } }