public AdminForm(FrontForm front) { try { Locations = SaveLoad.LoadAirports(); Fleet = SaveLoad.LoadFleet(); Flights = SaveLoad.LoadFlights(); AllAirports = SaveLoad.LoadAllAirports(); } catch (FileNotFoundException ex) { MessageBox.Show(ex.Message); } Front = front; InitializeComponent(); //the first panel to be displayed FlightPanel flightPanel = new FlightPanel(Flights, Fleet, Locations); //displaying method with inputed panel AddControls(flightPanel); btnFlight.BackColor = SystemColors.Control; btnFlight.Enabled = false; }
public ClientServices(FrontForm form) { FlightsToBook = SaveLoad.LoadFlights(); Form = form; InitializeComponent(); btnBooking.Visible = false; //first tab to be loaded SearchFlight searchFlight = new SearchFlight(FlightsToBook, this); AddControls(searchFlight); btnSearchFlight.BackColor = SystemColors.Control; btnSearchFlight.Enabled = false; }