Ejemplo n.º 1
0
 private void TransactionUnperformed(object sender, MapTransactionMananger.TransactionEventArgs transactionEventArgs)
 {
 }
Ejemplo n.º 2
0
        public void SetBinding(object contentObject)
        {
            var genericTemplate = contentObject as IContentTemplate;
            _template = contentObject as MapTemplate;

            TabText = "[" + "Map" + "] " + genericTemplate.Name;
            Text = "[" + "Map" + "] " + genericTemplate.Name;
            Update();
            Invalidate();

            // Get our map
            var map = GameMap.FromTemplate(_template);
            Map = map;

            mapView.SetMap(map);

            TransactionMananger = new MapTransactionMananger(Map);
            TransactionMananger.TransactionPerformed += TransactionPerformed;
            TransactionMananger.TransactionUnperformed += TransactionUnperformed;
            UndoManager = new UndoManager(TransactionMananger);
        }
Ejemplo n.º 3
0
 private void TransactionPerformed(object sender, MapTransactionMananger.TransactionEventArgs transactionEventArgs)
 {
     // Make sure it's not a one click tool, if so we should filter it out
     if (transactionEventArgs.ActionPerformed as GenericToolAction == null)
     {
         UndoManager.AddTransaction(transactionEventArgs.ActionPerformed);
     }
 }
Ejemplo n.º 4
0
 public UndoManager(MapTransactionMananger transactionMananger)
 {
     _transactionMananger = transactionMananger;
 }