/*function to be called when the settings form that we opened is being closed. * This function takes in an init form which we will use to calculate the new total costs.*/ public void SettingsClosed(Init init) { ListedToPrint newCars = new ListedToPrint(); newCars = init.RecalculateMPG(carList, carList.SelectedCar); carList = newCars.CarList; }
public void SettingsClosed(Init init) { ListedToPrint newCars1 = new ListedToPrint(); newCars1 = init.RecalculateMPG(car1List, car1List.SelectedCar); car1List = newCars1.CarList; ListedToPrint newCars2 = new ListedToPrint(); newCars2 = init.RecalculateMPG(car2List, car2List.SelectedCar); car2List = newCars2.CarList; try { setComparison(car1List.SelectedCar, car2List.SelectedCar); } catch (Exception error) { Console.WriteLine(error.ToString()); } }