Esempio n. 1
0
        private void btninsert_Click(object sender, EventArgs e)
        {
            var coche = new Coche();

            coche.Marca  = this.txtmarca.Text;
            coche.Modelo = this.txtmodelo.Text;
            ImageConverter converter = new ImageConverter();

            coche.Imagen = (byte[])converter.ConvertTo(this.pictureBox1.Image, typeof(byte[]));
            coches.Add(coche);
            this.lstcoches.Items.Add(coche.Marca + " " + coche.Modelo);
            this.txtmarca.Text  = "";
            this.txtmodelo.Text = "";
        }
Esempio n. 2
0
 public virtual void AddCoche(Coche coche)
 {
     Coches.Add(coche);
 }