Exemple #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);
        }
Exemple #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);
        }
        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);
        }
        private void CreateNewMap()
        {
            var mapSizeDialog = new MapSizeDialog();
            DialogResult dialogResult = mapSizeDialog.ShowDialog(this);
            if (dialogResult == DialogResult.Cancel) return;

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