/// <summary> /// Creates an object that describes both the value and the undo action to a command. /// </summary> /// <param name="value">The value of the object.</param> /// <param name="undoAction">The Undo action.</param> public UndoObject(object oldValue, object newValue, UndoAction undoAction) { // Initialize the object this.OldValue = oldValue; this.NewValue = newValue; this.UndoAction = undoAction; }
public CollectionChangedEventArgs(RoutedEvent routedEvent, UndoAction undoAction, CollectionChangedAction collectionChangedAction) : base(routedEvent) { // Initialize the object this.undoAction = undoAction; this.collectionChangedAction = collectionChangedAction; }
public CollectionChangedEventArgs(RoutedEvent routedEvent, UndoAction undoAction, CollectionChangedAction collectionChangedAction, object item, int index) : base(routedEvent) { // Initialize the object this.undoAction = undoAction; this.collectionChangedAction = collectionChangedAction; ArrayList items = new ArrayList(); items.Add(item); switch (this.collectionChangedAction) { case CollectionChangedAction.Add: this.newStartingIndex = index; this.newItems = items; break; case CollectionChangedAction.Remove: this.oldStartingIndex = index; this.oldItems = items; break; } }
public CollectionChangedEventArgs(RoutedEvent routedEvent, UndoAction undoAction, CollectionChangedAction collectionChangedAction, object newItem, object oldItem, int newIndex) : base(routedEvent) { // Initialize the object this.undoAction = undoAction; this.collectionChangedAction = collectionChangedAction; ArrayList newItems = new ArrayList(); newItems.Add(newItem); ArrayList oldItems = new ArrayList(); oldItems.Add(oldItem); switch (this.collectionChangedAction) { case CollectionChangedAction.Replace: this.newItems = newItems; this.oldItems = oldItems; this.newStartingIndex = newIndex; break; } }
public UndoPropertyChangedEventArgs(RoutedEvent routedEvent, UndoAction undoAction, DependencyProperty dependencyProperty, object oldValue, object newValue) : base(routedEvent) { // Initialize the object this.UndoAction = undoAction; this.DependencyProperty = dependencyProperty; this.OldValue = oldValue; this.NewValue = newValue; }
public ColumnChangedEventArgs(RoutedEvent routedEvent, UndoAction undoAction, ReportColumn reportColumn, DependencyProperty dependencyProperty, object oldValue, object newValue) : base(routedEvent) { // Initialize the object. this.UndoAction = undoAction; this.ColumnDefinition = reportColumn; this.DependencyProperty = dependencyProperty; this.OldValue = oldValue; this.NewValue = newValue; }
public CollectionChangedEventArgs(RoutedEvent routedEvent, UndoAction undoAction, CollectionChangedAction collectionChangedAction, IList newItems, IList oldItems) : base(routedEvent) { // Initialize the object this.undoAction = undoAction; this.collectionChangedAction = collectionChangedAction; switch (this.collectionChangedAction) { case CollectionChangedAction.Replace: this.newItems = newItems; this.oldItems = oldItems; break; } }