Exemplo n.º 1
0
        private void resizeMapToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!activeMap.IsEditable)
            {
                MessageBox.Show(@"You can enable editability in the Edit menu or by pressing Ctrl+E.",
                                @"Map not editable.", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            var          mapSizeDialog = new MapSizeDialog();
            DialogResult dialogResult  = mapSizeDialog.ShowDialog(this);

            if (dialogResult == DialogResult.Cancel)
            {
                return;
            }

            AddMapAction(new MapActionResize(activeMap.Size, mapSizeDialog.MapSize));

            activeMap.Size       = mapSizeDialog.MapSize;
            activeMap.IsModified = true;
            SetImage(null);
            RenderMap();
            //UpdateMinimap(true, true);
        }
Exemplo n.º 2
0
        private void CreateNewMap()
        {
            var          mapSizeDialog = new MapSizeDialog();
            DialogResult dialogResult  = mapSizeDialog.ShowDialog(this);

            if (dialogResult == DialogResult.Cancel)
            {
                return;
            }

            CreateNewMapCore(mapSizeDialog.MapSize.Width, mapSizeDialog.MapSize.Height);
        }
Exemplo n.º 3
0
        private void resizeMapToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!activeMap.IsEditable)
            {
                MessageBox.Show(@"You can enable editability in the Edit menu or by pressing Ctrl+E.",
                                @"Map not editable.", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            var mapSizeDialog = new MapSizeDialog();
            DialogResult dialogResult = mapSizeDialog.ShowDialog(this);
            if (dialogResult == DialogResult.Cancel) return;

            AddMapAction(new MapActionResize(activeMap.Size, mapSizeDialog.MapSize));

            activeMap.Size = mapSizeDialog.MapSize;
            activeMap.IsModified = true;
            SetImage(null);
            RenderMap();
            //UpdateMinimap(true, true);
        }
Exemplo n.º 4
0
        private void CreateNewMap()
        {
            var mapSizeDialog = new MapSizeDialog();
            DialogResult dialogResult = mapSizeDialog.ShowDialog(this);
            if (dialogResult == DialogResult.Cancel) return;

            CreateNewMapCore(mapSizeDialog.MapSize.Width, mapSizeDialog.MapSize.Height);
        }