private void OnEditManageTileBrushes(object sender, EventArgs eventArgs) { TileBrushDialog tileBrushDialog = new TileBrushDialog(m_map, m_tileBrushCollection); tileBrushDialog.ShowDialog(this); UpdateTileBrushDropDown(); UpdateEditControls(); }
private void OnEditMakeTileBrush(object sender, EventArgs eventArgs) { Layer layer = m_mapPanel.SelectedLayer; if (layer == null) return; TileSelection tileSelection = m_mapPanel.TileSelection; if (tileSelection.IsEmpty()) return; string tileBrushId = m_tileBrushCollection.GenerateId(); TileBrush newTileBrush = new TileBrush(tileBrushId, layer, tileSelection); TileBrushDialog tileBrushDialog = new TileBrushDialog(m_map, m_tileBrushCollection, newTileBrush); if (tileBrushDialog.ShowDialog(this) == DialogResult.OK) { UpdateTileBrushDropDown(); m_mapPanel.TileSelection.Clear(); OnToolsTileBrush(sender, eventArgs); UpdateTileBrushDropDown(); UpdateEditControls(); } }