Esempio n. 1
0
        private void chevyRadioButton_CheckedChanged(object sender, EventArgs e)
        {
            if (chevyRadioButton.Checked)
            {
                currentAutoSelected           = "Chevy Lumina";
                selectedAutoMileageCalculator = new AutoMilageCalculator(currentAutoSelected);

                UpdateMileageAndTotalMilesLabels();
            }
        }
Esempio n. 2
0
        public travelExpenseForm()
        {
            InitializeComponent();

            // Set starting auto and route to Buick and freeway
            currentAutoSelected  = buickRadioButton.Text;
            currentRouteSelected = freewayRadioButton.Text;
            currentRouteDistance = FREEWAY_DISTANCE_IN_MILES;

            // Set the current auto mileage calculator for the Buick Electra
            selectedAutoMileageCalculator = new AutoMilageCalculator("Buick Electra");

            // Update display values for the default Buick and city route
            UpdateMileageAndTotalMilesLabels();

            gasPriceTextBox.Text = "0.00";
        }