private void populateFields(Gage gage) { textBoxLabel.Text = gage.Label; checkBoxFemale.Checked = (gage.ForSex == 0 || gage.ForSex == 2); checkBoxMan.Checked = (gage.ForSex == 1 || gage.ForSex == 2); numericUpDownDuration.Value = innerGage.Duration; }
private void button2_Click(object sender, EventArgs e) { textBoxLabel.Text = "Entrez ici le gage"; checkBoxFemale.Checked = true; checkBoxMan.Checked = true; numericUpDownDuration.Value = 4; innerGage = new Gage(((Pack)comboBoxPackGages.SelectedItem).Id); }
private void listBoxGages_SelectedIndexChanged(object sender, EventArgs e) { innerGage = (Gage)listBoxGages.SelectedItem; populateFields(innerGage); }