1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
// AJOUTER UNE MARQUE
private void MarquePictureBox_Click(object sender, EventArgs e)
{
Popup_ajout_expressForm mon_popup = new Popup_ajout_expressForm();
// TAILLE DU FORM
mon_popup.Size = new Size(420, 200);
mon_popup.StartPosition = FormStartPosition.CenterScreen;
// TITRE DU FORM
Label TitreForm = new Label();
TitreForm.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
TitreForm.AutoSize = true;
TitreForm.Text = "Ajouter une marque de voiture";
TitreForm.Location = new Point(10, 20);
mon_popup.Controls.Add(TitreForm);
// AJOUTER UNE MARQUE
Label Nom_marqueLabel = new Label();
Nom_marqueLabel.Text = "Nom de la marque :";
Nom_marqueLabel.Location = new Point(10, 57);
mon_popup.Controls.Add(Nom_marqueLabel);
TextBox Nom_marqueTextBox = new TextBox();
Nom_marqueTextBox.Location = new Point(150, 54);
Nom_marqueTextBox.Size = new Size(250, 20);
mon_popup.Controls.Add(Nom_marqueTextBox);
// AJOUTER UN LOGO
Label LogoLabel = new Label();
LogoLabel.Text = "Logo :";
LogoLabel.Location = new Point(10, 84);
mon_popup.Controls.Add(LogoLabel);
Button ImageOpenFileDialog = new Button();
ImageOpenFileDialog.Text = "Parcourrir";
ImageOpenFileDialog.Location = new Point(150, 80);
ImageOpenFileDialog.Size = new Size(75, 23);
mon_popup.Controls.Add(ImageOpenFileDialog);
// BOUTON VALIDER
Button ValiderButton = new Button();
ValiderButton.Text = "Valider";
ValiderButton.Location = new Point(320, 157);
ValiderButton.Size = new Size(80, 23);
mon_popup.Controls.Add(ValiderButton);
// BOUTON ANNULER
Button AnnulerButton = new Button();
AnnulerButton.Text = "Annuler";
AnnulerButton.Location = new Point(234, 157);
AnnulerButton.Size = new Size(80, 23);
mon_popup.Controls.Add(AnnulerButton);
mon_popup.ShowDialog();
} |
Partager