private void tbbTargetResize_Click(object sender, EventArgs e) { using (FormNew dialog = new FormNew(m_presets, m_properties)) { if (dialog.ShowDialog(this) == DialogResult.OK) { TilesetProperties tp = new TilesetProperties(); tp.Width = dialog.TileSetWidth; tp.Height = dialog.TileSetHeight; tp.TileSize = dialog.TileSize; ChangeSize(tp); } } }
private void tbbTargetNew_Click(object sender, EventArgs e) { using (FormNew dialog = new FormNew(m_presets)) { dialog.TileSetWidth = m_lastTileSetWidth; dialog.TileSetHeight = m_lastTileSetHeight; dialog.TileSize = m_lastTileSize; if (dialog.ShowDialog(this) == DialogResult.OK) { m_lastTileSetWidth = dialog.TileSetWidth; m_lastTileSetHeight = dialog.TileSetHeight; m_lastTileSize = dialog.TileSize; m_lastDrawTileSize = dialog.TileSize; TilesetProperties tp = new TilesetProperties(); tp.Width = dialog.TileSetWidth; tp.Height = dialog.TileSetHeight; tp.TileSize = dialog.TileSize; NewTileset(tp); } } }