private void mainitem_Click(object sender, EventArgs e)
{
// Go for all items to update selection
for(int i = 0; i < NUM_MAIN_ITEM_CONTROLS; i++)
{
if(mainitems[i] == sender)
{
if(selectedindex == (i + scrolloffset))
{
// Already selected, de-select now
Deselect();
}
else
{
// Select this one
selectedindex = i + scrolloffset;
removeonebutton.Enabled = true;
removeallbutton.Enabled = true;
increasebutton.Enabled = true;
mainitems[i].StartInfoFlash();
}
// Update buttons
removeonebutton.SetupColors(General.Colors);
removeallbutton.SetupColors(General.Colors);
increasebutton.SetupColors(General.Colors);
}
else
{
// Not selected
mainitems[i].StopInfoFlash();
}
}
}