示例#1
0
    def __init__(self, sys_argv):
        super(App, self).__init__(sys_argv)

        # Init config
        config = Config()

        # Init main controller
        self.main_controller = MainController(config)

        # Init main view
        self.main_view = MainView(self.main_controller)

        # Show main view
        self.main_view.show()
示例#2
0
    def __init__(self, sys_argv):
        super(App, self).__init__(sys_argv)

        config = MainController.load_config()
        bitshares_instance = BitShares(config['node'])

        # Wallet unlock
        unlock_ctrl = WalletController(bitshares_instance)
        if unlock_ctrl.wallet_created():
            unlock_view = UnlockWalletView(unlock_ctrl)
        else:
            unlock_view = CreateWalletView(unlock_ctrl)

        if unlock_view.exec_():
            bitshares_instance = unlock_ctrl.bitshares
            self.main_ctrl = MainController(bitshares_instance)
            self.main_view = MainView(self.main_ctrl)
            self.main_view.show()
        else:
            sys.exit()
示例#3
0
class App(QApplication):
    def __init__(self, sys_argv):
        super(App, self).__init__(sys_argv)

        config = Config()
        bitshares_instance = BitShares(config['node'], num_retries=-1, expiration=60)

        # Wallet unlock
        unlock_ctrl = WalletController(bitshares_instance)
        if unlock_ctrl.wallet_created():
            unlock_view = UnlockWalletView(unlock_ctrl)
        else:
            unlock_view = CreateWalletView(unlock_ctrl)

        if unlock_view.exec_():
            bitshares_instance = unlock_ctrl.bitshares
            self.main_ctrl = MainController(bitshares_instance, config)
            self.main_view = MainView(self.main_ctrl)
            self.main_view.show()
        else:
            sys.exit()