Code:
public void Combobox1_SelectedIndexChanged(object sender, System.EventArgs e)
{
if((string)Combobox1.SelectedItem == "")
{
CheckBoxesClear();
}
else
{
CheckBoxesClearElse();
}
Combobox2.Items.Remove (Combobox2.SelectedItem);
Combobox2.Items.Clear();
Combobox2.Enabled = false;
textBox1.Enabled = false;
textBox2.Enabled = false;
textBox3.Enabled = false;
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
switch ((string)Combobox1.SelectedItem)
{
case "AA":
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "AB":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox2.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AC":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AD":
Combobox2.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AE":
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "AF":
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "AG":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AH":
Combobox2.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AI":
textBox1.Enabled = true;
break;
case "AJ":
textBox1.Enabled = true;
break;
case "AK":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AL":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox2.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AM":
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "AN":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AO":
Combobox2.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AP":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox2.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AQ":
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "AR":
textBox1.Enabled = true;
break;
case "AS":
textBox2.Enabled = true;
textBox3.Enabled = true;
break;
case "AT":
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "AU":
textBox1.Enabled = true;
break;
case "AV":
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "AW":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AX":
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "AY":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "AZ":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox2.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "BA":
textBox1.Enabled = true;
break;
case "BB":
textBox3.Enabled = true;
break;
case "BC":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "BD":
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "BE":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox2.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "BF":
textBox3.Enabled = true;
break;
case "BG":
textBox1.Enabled = true;
textBox2.Enabled = true;
break;
case "BH":
Combobox2.Enabled = true;
textBox1.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "BI":
textBox3.Enabled = true;
break;
case "BJ":
break;
case "BK":
Combobox2.Enabled = true;
textBox3.Enabled = true;
Combobox2.Items.AddRange(new object[]{ "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
case "BL":
Combobox2.Enabled = true;
textBox1.Enabled = true;
Combobox2.Items.AddRange(new object[] { "1", "2", "3", "4", "5", "6",
"7", "8"});
break;
}
}
there it is. Told you it was big...