public CharacterModel(Character character) : base(character) { // EditCommand = new GenericCommand(p => BeginEdit(), p => true); CommitChangesCommand = new GenericCommand(p => EndEdit(), p => HasChanges); CancelChangesCommand = new GenericCommand(p => CancelEdit(), p => HasChanges); ApplyChangesCommand = new GenericCommand(delegate(object param) { EndEdit(); BeginEdit(); }, p => HasChanges); }
public DataModel(Data data) : base(data) { // EditCommand = new GenericCommand(p => BeginEdit(), p => true); CommitChangesCommand = new GenericCommand(p => EndEdit(), p => HasChanges); CancelChangesCommand = new GenericCommand(p => CancelEdit(), p => HasChanges); ApplyChangesCommand = new GenericCommand(delegate(object param) { EndEdit(); BeginEdit(); }, p => HasChanges); }