Exemplo n.º 1
0
        private void ReplaceMap(AbstractMap map)
        {
            if (this.Map != null)
            {
                window.RemoveRegion(this.Map);
                this.Map.Dispose();
            }

            this.Map      = map;
            this.UndoRedo = new UndoStack.UndoStack();

            if (this.Map != null)
            {
                this.Map.Location = new Point(0, 0);
                this.Map.Size     = window.Size;
                window.AddRegion(this.Map);
                this.Map.ViewFrom(this.Map.View, true);
            }
            window.Invalidate();
        }
Exemplo n.º 2
0
        private void ReplaceMap(AbstractMap map)
        {
            if (this.Map != null)
            {
                window.RemoveRegion(this.Map);
                this.Map.Dispose();
            }

            this.Map = map;
            this.UndoRedo = new UndoStack.UndoStack();

            if (this.Map != null)
            {
                this.Map.Location = new Point(0, 0);
                this.Map.Size = window.Size;
                window.AddRegion(this.Map);
                this.Map.ViewFrom(this.Map.View, true);
            }
            window.InvalidateTiles();
        }