コード例 #1
0
ファイル: Form1.cs プロジェクト: Luisx07/Vectores-Ordenados
 private void button1_Click(object sender, EventArgs e)
 {
     a            = new CarroIniciar();
     a.placa_1    = txtPlaca1.Text;
     a.marca_1    = txtMarca1.Text;
     a.modelo_1   = txtModelo.Text;
     a.telefono_1 = txtTelefono.Text;
     a.ano_1      = txtaño.Text;
     n.agregar(a);
     if (n.i < n.t)
     {
         MessageBox.Show("Agregado correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.None);
     }
     else
     {
         MessageBox.Show("Se ha alcanzado el limite de registros", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     txtPlaca1.Clear();
     txtMarca1.Clear();
     txtModelo.Clear();
     txtTelefono.Clear();
     txtaño.Clear();
 }
コード例 #2
0
 public void agregar(CarroIniciar datos)
 {
     car[contador] = datos;
     contador++;
 }