private void AddTypeControls( TerrainType terrainType ) { TerrainTypeEditorControl newControl = new TerrainTypeEditorControl( ); newControl.Enabled = terrainType != null; if ( terrainType != null ) { newControl.TerrainType = terrainType; } newControl.RemoveControl += TerrainTypeEditorControl_RemoveControl; newControl.TerrainTypeChanged += TerrainTypeEditorControl_TerrainTypeChanged; terrainTypeControlsLayoutPanel.Controls.Add( newControl ); }
private void TerrainTypeEditorControl_RemoveControl( TerrainTypeEditorControl control ) { m_TerrainTypes.Remove( control.TerrainType ); terrainTypeControlsLayoutPanel.Controls.Remove( control ); UpdateSample( ); }