4 using System.Collections.Generic;
7 using SiliconStudio.ActionStack;
9 namespace SiliconStudio.Presentation.ViewModel.
ActionStack
16 private readonly List<IDirtiableViewModel> dirtiables;
27 if (dirtiables == null)
throw new ArgumentNullException(
"dirtiables");
28 this.dirtiables = dirtiables.ToList();
34 public IReadOnlyCollection<IDirtiableViewModel> Dirtiables {
get {
return dirtiables; } }
37 public override bool IsSaved {
get {
return isSaved; } set {
if (isSaved != value) { isSaved = value; dirtiables.ForEach(x => x.NotifyActionStackChange(ActionStackChange.Save)); } } }
40 public override bool IsDone {
get {
return base.IsDone; }
protected set { base.IsDone = value; dirtiables.ForEach(x => x.NotifyActionStackChange(ActionStackChange.UndoRedo)); } }
ViewModelActionItem(string name, IEnumerable< IDirtiableViewModel > dirtiables)
Initializes a new instance of the ViewModelActionItem class with the specified name and dirtiable obj...
Base class for action items.
An abstact class that inherits from ActionItem and can be used to manage actions related to an IDirti...
This class represents a thread-safe stack of action items that can be undone/redone.