private void CrearVehículoButton_Click(object sender, EventArgs e) { carrito = new ClsAutomovil("PICKUP, NISSAN", 180); carrito.color = "ROJO"; MessageBox.Show($"Vehículo Creado\nMarca: {carrito.Marca}\nColor: {carrito.color}\nVelocidad Maxima: {carrito.VelocidadMax}km/h"); pictureBox1.Image = Properties.Resources.PICKUPNISSAN; }
private void BotonInicio_Click(object sender, EventArgs e) { carrito = new ClsAutomovil("Ford Mustang", 200); // se debe de imporatar la libreria de ClsAutomovil //enacapsulamiento string CarroCreado = "El carro esta Creado"; labelCrear.Text = CarroCreado; borrarDatos(); }
private void buttonInicio_Click(object sender, EventArgs e) { System.Media.SoundPlayer logout = new System.Media.SoundPlayer(Properties.Resources.ENCENDER_CARRO); logout.Play(); carrito = new ClsAutomovil("Meches", 150); carrito.color = "ROJO"; }
private void btnCrear_Click(object sender, EventArgs e) { carrito = new ClsAutomovil("BMW", "Rojo", 250); this.txtColor.Text = carrito.color; this.txtMarca.Text = carrito.marca; this.txtEstado.Text = "Autmomovil Creado"; this.txtVelocidadMaxima.Text = Convert.ToString(carrito.velocidadMaxima); this.txtVelocidadActual.Text = Convert.ToString(carrito.velocidadActual); creado = true; }