private void brush_Click(object sender, EventArgs e) { var brushControl = (Control)sender; var brushName = (string)brushControl.Tag; _seletedTile = TileProvider.GetBrush(brushName); }
private void brushSelect_SelectedIndexChanged(object sender, EventArgs e) { var selectedBrushName = (string)brushSelect.SelectedItem; var selectedBrush = TileProvider.GetBrush(selectedBrushName); brushSelect.BackColor = selectedBrush.EditorColor; _seletedTile = selectedBrush; }