예제 #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 = "";
        }
예제 #2
0
파일: Usuario.cs 프로젝트: jesumarquez/lt
 public virtual void AddCoche(Coche coche)
 {
     Coches.Add(coche);
 }