protected void selectSpeed(object sender, EventArgs e) { RadioButton selected = sender as RadioButton; if (selected == slowButton) { sl.setMode("slow"); secondsPassed = 0; } else { sl.setMode("fast"); secondsPassed = 0; } }