private void checkBoxOnlyNatural_CheckedChanged(object sender, EventArgs e) { for (int c = 0; c < panels.Count; c++) panels[c].Visible = (!checkBoxOnlyNatural.Checked || naturalIds == null || naturalIds.Count == 0 || naturalIds.IndexOf(c) >= 0); }