示例#1
0
 protected void AddToUndoBuffer(GraphActionType actionType, DrawingItem cutItem, DrawingItem newItem)
 {
     if (this.currentActionIndex != (this.GraphActions.Count - 1)) // Some undo occured before
      {
     // Delete all that has been undid
     this.GraphActions = this.GraphActions.Take(this.currentActionIndex + 1).ToList();
      }
      this.GraphActions.Add(new GraphAction(actionType, cutItem, newItem));
      this.currentActionIndex++;
 }
示例#2
0
 public GraphAction(GraphActionType actionType, DrawingItem targetItem, DrawingItem targetItem2)
 {
     this.ActionType = actionType;
      this.TargetItem = targetItem;
      this.TargetItem2 = targetItem2;
 }