private void setSpeedButton_Click(object sender, EventArgs e) { carSettingsForm open = new carSettingsForm(car); open.Speed = true; open.ShowDialog(); }
private void tankCapacityButton_Click(object sender, EventArgs e) { a = true; carSettingsForm open = new carSettingsForm(car); open.TC = true; open.ShowDialog(); }
private void getGasButton_Click(object sender, EventArgs e) { if (a == true) { carSettingsForm open = new carSettingsForm(car); open.Gas = true; open.ShowDialog(); } else { MessageBox.Show("Unfortunately you have to set a tank capacity before you can get gas!", "Fuel", MessageBoxButtons.OK, MessageBoxIcon.Information); } }