public AZS() { InitializeComponent(); Cb_Fuel.Focus(); Lb_Fuel.Text = $"Gazoline: {Gazoline} Gas: {Gas} Disiel: {Disiel}"; Tb_Tea.Text = Tea.ToString(); Tb_Coffee.Text = Coffee.ToString(); Tb_Coffee_with_milk.Text = Coffee_with_Milk.ToString(); Tb_Cappuccino.Text = Cappuccino.ToString(); Tb_HotDog.Text = Hotdog.ToString(); Tb_Juice.Text = Juice.ToString(); Tb_Sandwich.Text = Sandwich.ToString(); }
private void Nud_Fuel_ValueChanged(object sender, EventArgs e) { Lb_volume.Text = $"You have selected {Nud_Fuel.Value} liters"; if (Cb_Fuel.Text == String.Empty || Nud_Fuel.Value == 0) { MessageBox.Show("Check fuel type and volume input"); Cb_Fuel.Focus(); Nud_Fuel.Value = 0; return; } Choose_fuel(); Cost_of_fuel = Price * Nud_Fuel.Value; Tb_cost_fuel.Text = Cost_of_fuel.ToString(); }
private void Cb_Fuel_TextChanged(object sender, EventArgs e) { Cb_Fuel.Focus(); Lb_type.Text = $"You have chosen: {Cb_Fuel.Text}"; }