This repository has been archived on 2020-12-03. You can view files and clone it, but cannot push or open issues or pull requests.
py-gva/gui-tkinter.py

44 lines
1014 B
Python
Raw Normal View History

2020-11-15 07:27:51 +01:00
#!/usr/bin/env python3
from tkinter import *
2020-11-17 03:15:43 +01:00
sys.path.insert(1, 'libs')
from paylib import *
2020-11-15 07:27:51 +01:00
window = Tk()
title = Label(window, text="Paiement Ḡ1")
title.pack()
2020-11-15 09:12:37 +01:00
# Recipient input
recipientEntry = Entry()
# xRecipient = Entry(window, textvariable=recipient, width=30)
recipientEntry.pack()
# Amount input
AmountEntry = Entry()
AmountEntry.pack()
2020-11-15 07:27:51 +01:00
# Comment input
2020-11-15 09:12:37 +01:00
commentEntry = Entry()
commentEntry.pack()
2020-11-15 07:27:51 +01:00
def ProceedPaiement():
2020-11-15 09:12:37 +01:00
recipient = str(recipientEntry.get())
amount = int(AmountEntry.get())
comment = str(commentEntry.get())
print("Paiement en cours ... " + recipient)
returnGen = sendGenDoc(recipient, amount, comment)
2020-11-15 09:22:12 +01:00
checkTXDoc(returnGen, recipient, amount, comment)
2020-11-15 09:12:37 +01:00
returnSigned = signDoc(returnGen)
sendTXDoc(returnSigned)
2020-11-15 07:27:51 +01:00
2020-11-17 02:48:56 +01:00
# del recipient, amount, comment, returnGen, returnSigned
recipient = amount = comment = returnGen = returnSigned = None
2020-11-15 07:27:51 +01:00
sendButton = Button(window, text="Envoyer", command=ProceedPaiement)
sendButton.pack()
window.mainloop()