示例#1
0
 def iniciar(self):
     opts = [self.cadastrar, self.verCarros]
     optsString = ['Cadastrar carro', 'Ver carros']
     while True:
         opt = GeneralView.menu(optsString)
         if opt is None or opt >= len(opts):
             break
         else:
             opts[opt]()
示例#2
0
    def iniciar(self):
        opts = [self.alugarCarro, self.verAlugueis]
        optsString = ['Alugar carro', 'Ver alguéis']
        while True:
            opt = GeneralView.menu(optsString)

            if opt is None or opt >= len(opts):
                break
            else:
                opts[opt]()
示例#3
0
    def iniciar(self):
        opts = [
            self.carController, self.userController, self.aluguelController
        ]
        optsString = ['Carros', 'Usuários', 'Aluguéis']
        while True:
            opt = GeneralView.menu(optsString, voltar='Sair')

            if opt is None or opt >= len(opts):
                GeneralView.message('Adeus')
                break
            else:
                opts[opt]()