Я работал в Cinema Booking Software для windows, у него около 20 кнопок, и я не могу заставить мой код кнопки работать, он превращается только в (ЗЕЛЕНЫЙ) При нажатии и нет функции для изменения КРАСНЫЙ после нажатия кнопки бронирования.
private Button lastButton = null;
private void button57_Click(object sender, EventArgs e)
{
// Change the background color of the button that was clicked
Button current = (Button)sender;
current.BackColor = Color.GreenYellow;
// Revert the background color of the previously-colored button, if any
if (lastButton != null)
lastButton.BackColor = SystemColors.Control;
// Update the previously-colored button
lastButton = current;
}