private void nUnitsEnemy_ValueChanged(object sender, EventArgs e) { NumericUpDown nud; nud = (NumericUpDown)sender; map.ChangeUnitsAttacking(Convert.ToInt32(nud.Value)); }