public void Clear() { Past.Clear(); Future.Clear(); _history.Clear(); _future.Clear(); CanUndo = false; CanRedo = false; }
public void AddHandler(HistoryHandler handler) { handler.ActionPush += (sender, action) => { if (!_acceptNew) { return; } _history.Push(action); Past.Add(action); _future.Clear(); Future.Clear(); CanRedo = false; CanUndo = true; }; }