private void cmbBackgrounds_SelectedIndexChanged(object sender, EventArgs e)
{
if ((cmbBackgrounds.SelectedIndex == cmbBackgrounds.Items.Count - 1) &&
(_room.BackgroundCount < Room.MAX_BACKGROUNDS))
{
if ((_room.BackgroundCount > 1) ||
(Factory.GUIController.ShowQuestion("You are about to import an extra background into this room, thus creating animated backgrounds. Are you sure this is what you want to do?\n\nIf you just want to change the background image, use the 'Change' button instead.", MessageBoxIcon.Question) == DialogResult.Yes))
{
ImportBackground(cmbBackgrounds.SelectedIndex);
RepopulateBackgroundList(_room.BackgroundCount - 1);
}
else
{
cmbBackgrounds.SelectedIndex = 0;
}
}
else
{
bufferedPanel1.Invalidate();
}
btnDelete.Enabled = (cmbBackgrounds.SelectedIndex > 0);
}