Пример #1
0
        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);
        }
Пример #2
0
 /// <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);
     }
 }