private void max(bool s)
{
ComboBox[] cba =
{
CB_1, CB_2, CB_3, CB_4, CB_5, CB_6, CB_7, CB_8, CB_9,
CB_10, CB_11, CB_12, CB_13, CB_14, CB_15, CB_16, CB_17,
};
CheckBox[] echk = { CHK_1, CHK_2, CHK_3, CHK_4, CHK_5, CHK_6, CHK_7, CHK_8 };
foreach (ComboBox t in cba)
t.SelectedIndex = (t.Items.Count-1);
if (!s)
foreach (CheckBox t in echk)
t.Checked = ModifierKeys != Keys.Control;
else if (ModifierKeys == Keys.Control)
{
foreach (ComboBox t in cba)
t.SelectedIndex = 0;
foreach (CheckBox t in echk)
t.Checked = false;
}
}
}