private void button3_Click_1(object sender, EventArgs e) { if (listView1.SelectedItems.Count != 1) { MessageBox.Show("Sélectionner une école s'il-vous-plait", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { FormEcole f1 = new FormEcole(); f1.FormBorderStyle = FormBorderStyle.FixedSingle; f1.Show(); f1.button1.Text = "Edit"; f1.lblBarre.Visible = true; for (i = 0; i < listView1.Items.Count; i++) { if (listView1.Items[i].Selected) { f1.txtNom.Text = Class1.Tab2[i][0]; f1.dateTimePicker1.Text = Class1.Tab2[i][1]; f1.txtEmail.Text = Class1.Tab2[i][2]; f1.txtContact.Text = Class1.Tab2[i][3]; f1.pictureBox4.ImageLocation = Class1.Tab2[i][4]; CodeQrBarcodeDraw qrcode = BarcodeDrawFactory.CodeQr; f1.pictureBox1.Image = qrcode.Draw(Class1.Tab2[i][0], 50); f1.lblPhoto.Visible = false; Class1.temp = i; } } } }
private void formEcoleToolStripMenuItem_Click(object sender, EventArgs e) { panel1.Controls.Clear(); FormEcole f = new FormEcole(); f.panel1.Visible = true; panel1.Controls.Add(f.panel1); }