private void buttonBlockClick(Object button, EventArgs e) { int index = ((Button)button).ImageIndex; curActiveBlock = index; }