-
Notifications
You must be signed in to change notification settings - Fork 0
/
M_About.py
51 lines (36 loc) · 888 Bytes
/
M_About.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
45
46
47
48
49
50
51
##############################
# import
##############################
import wx
import configparser
import GUI_About
##############################
# GUI的函数桥接
##############################
class CalcFrame(GUI_About.Main):
def __init__(self, parent):
# 定义主函数
GUI_About.Main.__init__(self, parent)
# 读取cfg配置文件
cfg = configparser.ConfigParser()
cfg.read('./cfg/main.cfg')
version = cfg.get('main', 'VERSION')
self.version.SetLabel('Version#' + version)
self.m_notebook1.SetSelection(0)
def Close(self, event):
try:
if app.GetAppName() != '_core.cp38-win_amd64':
self.Destroy()
except:
self.Hide()
##############################
# 主函数
##############################
def main():
global app
app = wx.App(False)
frame = CalcFrame(None)
frame.Show(True)
app.MainLoop()
if __name__ == "__main__":
main()