本文整理汇总了Python中electrum_ltc.Wallet.stop_threads方法的典型用法代码示例。如果您正苦于以下问题:Python Wallet.stop_threads方法的具体用法?Python Wallet.stop_threads怎么用?Python Wallet.stop_threads使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类electrum_ltc.Wallet
的用法示例。
在下文中一共展示了Wallet.stop_threads方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from electrum_ltc import Wallet [as 别名]
# 或者: from electrum_ltc.Wallet import stop_threads [as 别名]
def main(self, url):
storage = WalletStorage(self.config)
if not storage.file_exists:
import installwizard
wizard = installwizard.InstallWizard(self.config, self.network, storage)
wallet = wizard.run()
if not wallet:
exit()
else:
wallet = Wallet(storage)
wallet.start_threads(self.network)
self.main_window = w = ElectrumWindow(self.config, self.network)
# plugins that need to change the GUI do it here
run_hook('init')
w.load_wallet(wallet)
s = Timer()
s.start()
self.windows.append(w)
if url: w.set_url(url)
w.app = self.app
w.connect_slots(s)
w.update_wallet()
self.app.exec_()
wallet.stop_threads()
示例2: main
# 需要导入模块: from electrum_ltc import Wallet [as 别名]
# 或者: from electrum_ltc.Wallet import stop_threads [as 别名]
def main(self, url):
storage = WalletStorage(self.config)
if storage.file_exists:
wallet = Wallet(storage)
action = wallet.get_action()
else:
action = 'new'
if action is not None:
import installwizard
wizard = installwizard.InstallWizard(self.config, self.network, storage)
wallet = wizard.run(action)
if not wallet:
exit()
else:
wallet.start_threads(self.network)
# init tray
self.dark_icon = self.config.get("dark_icon", False)
icon = QIcon(":icons/electrum_dark_icon.png") if self.dark_icon else QIcon(':icons/electrum_light_icon.png')
self.tray = QSystemTrayIcon(icon, None)
self.tray.setToolTip('Electrum-LTC')
self.tray.activated.connect(self.tray_activated)
self.build_tray_menu()
self.tray.show()
# main window
self.main_window = w = ElectrumWindow(self.config, self.network, self)
self.current_window = self.main_window
#lite window
self.init_lite()
# plugins that need to change the GUI do it here
run_hook('init')
w.load_wallet(wallet)
s = Timer()
s.start()
self.windows.append(w)
if url:
self.set_url(url)
w.app = self.app
w.connect_slots(s)
w.update_wallet()
self.app.exec_()
# clipboard persistence
# see http://www.mail-archive.com/[email protected]/msg17328.html
event = QtCore.QEvent(QtCore.QEvent.Clipboard)
self.app.sendEvent(self.app.clipboard(), event)
wallet.stop_threads()
示例3: main
# 需要导入模块: from electrum_ltc import Wallet [as 别名]
# 或者: from electrum_ltc.Wallet import stop_threads [as 别名]
def main(self, url):
storage = WalletStorage(self.config)
if not storage.file_exists:
import installwizard
wizard = installwizard.InstallWizard(self.config, self.network, storage)
wallet = wizard.run()
if not wallet:
exit()
elif storage.get('wallet_type') in ['2of3'] and storage.get('seed') is None:
import installwizard
wizard = installwizard.InstallWizard(self.config, self.network, storage)
wallet = wizard.run(action= 'create2of3')
if not wallet:
exit()
else:
wallet = Wallet(storage)
wallet.start_threads(self.network)
# init tray
self.dark_icon = self.config.get("dark_icon", False)
icon = QIcon(":icons/electrum_dark_icon.png") if self.dark_icon else QIcon(':icons/electrum_light_icon.png')
self.tray = QSystemTrayIcon(icon, None)
self.tray.setToolTip('Electrum-LTC')
self.tray.activated.connect(self.tray_activated)
self.build_tray_menu()
self.tray.show()
# main window
self.main_window = w = ElectrumWindow(self.config, self.network, self)
self.current_window = self.main_window
#lite window
self.init_lite()
# plugins that need to change the GUI do it here
run_hook('init')
w.load_wallet(wallet)
s = Timer()
s.start()
self.windows.append(w)
if url: w.set_url(url)
w.app = self.app
w.connect_slots(s)
w.update_wallet()
self.app.exec_()
wallet.stop_threads()