Beispiel #1
0
    def show():
        option_tuple = ('New flight route', 'Show all flight routes')

        valid_user_inputs = ComponentUI.make_valid_menu_options_tuple(
            len(option_tuple))

        frame_functions = (FlightRouteUI.__show_new_flight_route_constructor,
                           FlightRouteUI.__show_all_flight_routes)

        return ComponentUI.run_frame(option_tuple,
                                     FlightRouteUI.__FRAME_IN_USE_STR,
                                     valid_user_inputs, frame_functions)
Beispiel #2
0
    def show():

        valid_user_inputs = ComponentUI.make_valid_menu_options_tuple(
            len(EmployeeUI.__option_tuple))

        frame_functions = (EmployeeUI.__show_new_employee_constructor, EmployeeUI.__show_all_employees, EmployeeUI.__show_all_pilots,\
            EmployeeUI.__show_all_flight_attendants, EmployeeUI.__show_employee_by_name_finder, EmployeeUI.__show_pilot_by_license_finder,\
                EmployeeUI.__show_employees_on_duty, EmployeeUI.__show_employees_off_duty)

        return ComponentUI.run_frame(EmployeeUI.__option_tuple,
                                     EmployeeUI.__FRAME_IN_USE_STR,
                                     valid_user_inputs, frame_functions)
    def show():

        #The options that show up at the start of this frame
        option_tuple = ('New airplane', 'Show all airplanes', 'Show airplanes in use', 'Show all airplane types')

        #The different inputs that allow the user to interact with this frame
        valid_user_inputs = ComponentUI.make_valid_menu_options_tuple(len(option_tuple))

        #The functions that this frame has stored in a tuple
        frame_functions = (AirplanesUI.__show_new_airplane_constructor, AirplanesUI.__show_all_airplanes,\
            AirplanesUI.__show_airplanes_in_use, AirplanesUI.__show_all_airplane_types)

        return ComponentUI.run_frame(option_tuple, AirplanesUI.__FRAME_IN_USE_STR, valid_user_inputs, frame_functions)