public void RegisterMap() { var t = new MapTree(); var r = new MapNode(t, "r"); ChangeManager manager = new ChangeManager(); manager.RegisterMap(t); r.Text = "changed"; Assert.IsTrue(manager.CanUndo); }
/// <summary> /// Change Manager is off by default (helps in deserialization). /// It is mandatory to turn on ChangeManager (MapCtrl and others assume that it is on). /// </summary> public void TurnOnChangeManager() { if(!ChangeManagerOn) { ChangeManager = new ChangeManager(); ChangeManager.RegisterMap(this); } }