-
Notifications
You must be signed in to change notification settings - Fork 0
/
M_Date.py
44 lines (32 loc) · 825 Bytes
/
M_Date.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
##############################
# import
##############################
import wx
import time
from zhdate import ZhDate
import GUI_Date
##############################
# GUI的函数桥接
##############################
class CalcFrame(GUI_Date.Main):
def __init__(self, parent):
# 定义主函数
GUI_Date.Main.__init__(self, parent)
self.T_NL1.SetLabel(str(ZhDate.today()))
self.T_NL2.SetLabel(str(ZhDate.chinese(ZhDate.today())))
def Time(self, event):
self.T_Time.SetLabel('当前时间:' + time.strftime('%H:%M:%S'))
def Close(self, event):
##self.Timer_Time.Stop()
self.Destroy()
##############################
# 主函数
##############################
def main():
global app
app = wx.App(False)
frame = CalcFrame(None)
frame.Show(True)
app.MainLoop()
if __name__ == "__main__":
main()