示例#1
0
文件: Form1.cs 项目: jdwoo090/Car
        private void setSpeedButton_Click(object sender, EventArgs e)
        {
            carSettingsForm open = new carSettingsForm(car);

            open.Speed = true;

            open.ShowDialog();
        }
示例#2
0
文件: Form1.cs 项目: jdwoo090/Car
        private void tankCapacityButton_Click(object sender, EventArgs e)
        {
            a = true;

            carSettingsForm open = new carSettingsForm(car);

            open.TC = true;

            open.ShowDialog();
        }
示例#3
0
文件: Form1.cs 项目: jdwoo090/Car
        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);
            }
        }