string[] oreTypes = new string[] { "blah", "two", "three" };
float[] oreSec = new float[] { 1.0f, 1.0f, 0.5f };
private void textBox1_Leave(sender object, EventArgs e)
{
//This gets called when the user leaves the text box with the security status in it
comboBox1.Items.Clear();
for(int x = 0; x < oreTypes.Length; x++)
{
//If the security the user entered is less than the system's security (i.e the system is safer) add it
if (float.Parse(textBox1.Text) <= oreSec[x])
{
comboBox1.Items.Add(oreTypes[x]);
}
}
}