private void btMotorEdit_Click(object sender, EventArgs e) { FormMotor form = new FormMotor(Carro.Motor, editMode); form.ShowDialog(); Carro.Motor = form.AuxDgv; }
private void btMotor_Click(object sender, EventArgs e) { FormMotor form; if (Carro.Motor == null) { form = new FormMotor(); } else { form = new FormMotor(Carro.Motor, true); } form.ShowDialog(); Carro.Motor = form.AuxDgv; }