示例#1
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     ClearAllInfo();
     if (comboBox1.SelectedIndex == 1)
     {
         label5.Show();
         Item5Desc.Show();
         item6volt.Show();
         button7.Hide();
         button8.Show();
     }
     else if (comboBox1.SelectedIndex == 2)
     {
         label5.Show();
         Item5Desc.Show();
         item6volt.Show();
         button7.Show();
         button8.Hide();
     }
     else
     {
         comboBox1.SelectedIndex = 0;
         label5.Hide();
         Item5Desc.Hide();
         item6volt.Hide();
         button7.Hide();
         button8.Hide();
     }
 }
示例#2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     // קוד להעלאת הקובץ למערך
     shop = new JoshShop();
     comboBox1.Items.Add("General Item");
     comboBox1.Items.Add("Electric Item");
     comboBox1.Items.Add("Sports Item");
     comboBox1.SelectedIndex = 0;
     label5.Hide();
     Item5Desc.Hide();
     item6volt.Hide();
     button7.Hide();
     button8.Hide();
 }