You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
85 lines
3.1 KiB
85 lines
3.1 KiB
6 months ago
|
import wx
|
||
|
from MySQL import transfer, Deposit, Withdrawal, Gaim, Make_bill, Query
|
||
|
import threading, time
|
||
|
|
||
|
class Jiemian(wx.App):
|
||
|
def doClose(self, j):
|
||
|
time.sleep(j)
|
||
|
self.frame.Close()
|
||
|
|
||
|
def __init__(self, Num):
|
||
|
wx.App.__init__(self)
|
||
|
self.Num = Num
|
||
|
self.frame = wx.Frame(parent=None, title='自助存取款机', size=(1000, 750),
|
||
|
style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER ^ wx.MAXIMIZE_BOX)
|
||
|
|
||
|
panel = wx.Panel(self.frame, -1)
|
||
|
# img=wx.Icon(name='logo.png',type=wx.BITMAP_TYPE_PNG)
|
||
|
# wx.StaticBitmap(panel,-1,bitmap=img,pos=(0,0))
|
||
|
# image = wx.Image("instagram.jpg", wx.BITMAP_TYPE_JPEG).ConvertToBitmap()
|
||
|
panel.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBack)
|
||
|
self.Query_transaction_records_button = wx.Button(panel, -1, "查询交易记录", size=(200, 60), pos=(0, 250))
|
||
|
self.transfer_accounts_button = wx.Button(panel, -1, "转 账", size=(200, 60), pos=(0, 375))
|
||
|
self.deposit = wx.Button(panel, -1, "存 款", size=(200, 60), pos=(800, 375))
|
||
|
self.withdrawal = wx.Button(panel, -1, "取 款", size=(200, 60), pos=(800, 250))
|
||
|
self.gaimi = wx.Button(panel, -1, "改 密", size=(200, 60), pos=(0, 500))
|
||
|
self.tuichu = wx.Button(panel, -1, "退 卡", size=(200, 60), pos=(800, 500))
|
||
|
|
||
|
self.Bind(wx.EVT_BUTTON, self.qery, self.Query_transaction_records_button)
|
||
|
self.Bind(wx.EVT_BUTTON, self.transf, self.transfer_accounts_button)
|
||
|
self.Bind(wx.EVT_BUTTON, self.depos, self.deposit)
|
||
|
self.Bind(wx.EVT_BUTTON, self.withdraw, self.withdrawal)
|
||
|
self.Bind(wx.EVT_BUTTON, self.gaim, self.gaimi)
|
||
|
self.Bind(wx.EVT_BUTTON, self.Tui, self.tuichu)
|
||
|
self.frame.Center()
|
||
|
self.frame.Show(True)
|
||
|
|
||
|
def OnEraseBack(self, event):
|
||
|
dc = event.GetDC()
|
||
|
if not dc:
|
||
|
dc = wx.ClientDC(self)
|
||
|
rect = self.GetUpdateRegion().GetBox()
|
||
|
dc.SetClippingRect(rect)
|
||
|
dc.Clear()
|
||
|
bmp = wx.Bitmap('img\\z.png')
|
||
|
dc.DrawBitmap(bmp, 0, 0)
|
||
|
|
||
|
def transf(self, event):
|
||
|
Num = self.Num
|
||
|
t = threading.Thread(target=self.doClose, args=(0.05,))
|
||
|
t.start()
|
||
|
app = transfer.Transfer(Num)
|
||
|
app.MainLoop()
|
||
|
|
||
|
def depos(self, event):
|
||
|
Num = self.Num
|
||
|
t = threading.Thread(target=self.doClose, args=(0.05,))
|
||
|
t.start()
|
||
|
app = Deposit.Deposit1(Num)
|
||
|
app.MainLoop()
|
||
|
|
||
|
def withdraw(self, event):
|
||
|
Num = self.Num
|
||
|
t = threading.Thread(target=self.doClose, args=(0.05,))
|
||
|
t.start()
|
||
|
app = Withdrawal.Withdrawal1(Num)
|
||
|
app.MainLoop()
|
||
|
|
||
|
def gaim(self, event):
|
||
|
Num = self.Num
|
||
|
t = threading.Thread(target=self.doClose, args=(0.05,))
|
||
|
t.start()
|
||
|
app = Gaim.Gaim1(Num)
|
||
|
app.MainLoop()
|
||
|
|
||
|
def Tui(self, event):
|
||
|
t = threading.Thread(target=self.doClose, args=(0.05,))
|
||
|
t.start()
|
||
|
|
||
|
def qery(self, event):
|
||
|
t = threading.Thread(target=self.doClose, args=(0.05,))
|
||
|
t.start()
|
||
|
app = Query.Query(self.Num)
|
||
|
app.MainLoop()
|
||
|
|