Exemplo n.º 1
0
        private void undoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (mapUndoActions.Count == 0)
            {
                return;
            }
            IMapAction lastAction = mapUndoActions.Last.Value;

            mapUndoActions.RemoveLast();

            mapRedoActions.AddLast(lastAction); // to be able to redo what has been undone
            lastAction.Undo(activeMap);
            RefreshMapActionUI(lastAction);
        }
Exemplo n.º 2
0
        private void undoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (mapUndoActions.Count == 0)
            {
                return;
            }
            IMapAction lastAction = mapUndoActions.Last.Value;

            mapUndoActions.RemoveLast();

            mapRedoActions.AddLast(lastAction); // to be able to redo what has been undone
            lastAction.Undo(activeMap);
            activeMap.IsModified = changeSinceRender = true;
            pnlImage.Image       = activeMap.GetRenderedMap(showTiles, showObjects);
            Invalidate();
        }