コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }