public Form1() { InitializeComponent(); correntUser = new User(); secondhand.Hide(); car.Hide(); pets.Hide(); RealEstate.Hide(); }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox1.SelectedItem.Equals("נדלן")) { type = "RealEstate"; RealEstate.Show(); car.Hide(); pets.Hide(); secondhand.Hide(); } else if (comboBox1.SelectedItem.Equals("רכב")) { type = "Vehicle"; car.Location = RealEstate.Location; RealEstate.Hide(); car.Show(); pets.Hide(); secondhand.Hide(); } else if (comboBox1.SelectedItem.Equals("חיות מחמד")) { type = "Pets"; pets.Location = RealEstate.Location; RealEstate.Hide(); car.Hide(); pets.Show(); secondhand.Hide(); } else if (comboBox1.SelectedItem.Equals("מוצרי יד שנייה")) { type = "SecondHandProduct"; secondhand.Location = RealEstate.Location; RealEstate.Hide(); car.Hide(); pets.Hide(); secondhand.Show(); } else if (comboBox1.SelectedItem.Equals("חבילה")) { type = "Package"; } }