Ejemplo n.º 1
0
        private void setSpeedButton_Click(object sender, EventArgs e)
        {
            carSettingsForm open = new carSettingsForm(car);

            open.Speed = true;

            open.ShowDialog();
        }
Ejemplo n.º 2
0
        private void tankCapacityButton_Click(object sender, EventArgs e)
        {
            a = true;

            carSettingsForm open = new carSettingsForm(car);

            open.TC = true;

            open.ShowDialog();
        }
Ejemplo n.º 3
0
        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);
            }
        }