Пример #1
0
        private void AddCustom(object sender, EventArgs e)
        {
            var dialog = new MapSizeChooser("Custom Size...");

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                TileMap.Add(TileMap.Create("CustomMap", dialog.MapWidth, dialog.MapHeight));
            }
        }
Пример #2
0
        private void ResizeMap(object sender, EventArgs e)
        {
            if (listMaps.SelectedItems.Count != 1)
            {
                return;
            }

            var index = int.Parse((string)listMaps.SelectedItems[0].Tag);
            var map   = TileMap.TileMaps[index];

            var dialog = new MapSizeChooser("Resize Map...", map.Width, map.Height);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                map.Resize(dialog.MapWidth, dialog.MapHeight);
            }
        }