public void Redo()
 {
     DiffUtility.Copy(this.Item, this.destItem);
     foreach (var item in this.childList)
     {
         item.Redo();
     }
 }
 public void Undo()
 {
     DiffUtility.Copy(this.destItem, this.Fields);
     foreach (var item in this.childList)
     {
         item.Undo();
     }
 }
Exemple #3
0
        protected override void OnRedo()
        {
            base.OnRedo();
            if (this.gridContext.Items.SourceCollection is DataGridCollectionView bindingList1)
            {
                var newItem = bindingList1.AddNew();
                bindingList1.CommitNew();
                bindingList1.Refresh();
                this.newItem = newItem;
            }

            if (this.destContext.Items.SourceCollection is DataGridCollectionView bindingList2)
            {
                var newItem = bindingList2.AddNew();
                DiffUtility.Copy(dataItem, newItem, true);
                bindingList2.CommitNew();
                bindingList2.Refresh();
                this.newDestItem = newItem;
            }
        }