private void AddFuel_Click(object sender, EventArgs e) { FuelConsumptionEditor editor = new FuelConsumptionEditor(); editor.Fuel = new GenerationSystem.FuelConsumption(); editor.TheEntity = TheEntity; if (editor.ShowDialog(this) == DialogResult.OK) { TheGenerator.FuelConsumptions.Add(editor.Fuel); FuelList.Items.Add(editor.Fuel); CallInfoChanged(TheGenerator); } }
private void EditByproduct_Click(object sender, EventArgs e) { FuelConsumptionEditor editor = new FuelConsumptionEditor(); editor.IsByproduct = true; editor.Fuel = ByproductList.SelectedItem as GenerationSystem.FuelConsumption; editor.TheEntity = TheEntity; if (editor.ShowDialog(this) == DialogResult.OK) CallInfoChanged(TheGenerator); }