-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.py
249 lines (156 loc) · 9.21 KB
/
ui.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Oct 26 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
import wx
import wx.xrc
###########################################################################
## Class PublishTool
###########################################################################
class PublishTool ( wx.Frame ):
def __init__( self, parent ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"苍龙测试服发布工具V1.5.3", pos = wx.DefaultPosition, size = wx.Size( 551,417 ), style = wx.CAPTION|wx.CLOSE_BOX|wx.MINIMIZE_BOX|wx.SYSTEM_MENU|wx.TAB_TRAVERSAL )
self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )
self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOW ) )
self.menu_bar = wx.MenuBar( 0 )
self.menu_chio = wx.Menu()
self.menu_item_history = wx.MenuItem( self.menu_chio, wx.ID_ANY, u"发布历史", wx.EmptyString, wx.ITEM_NORMAL )
self.menu_chio.Append( self.menu_item_history )
self.menu_item_edit_info = wx.MenuItem( self.menu_chio, wx.ID_ANY, u"信息修改", wx.EmptyString, wx.ITEM_NORMAL )
self.menu_chio.Append( self.menu_item_edit_info )
self.menu_bar.Append( self.menu_chio, u"选项(S)" )
self.menu_help = wx.Menu()
self.menu_item_update = wx.MenuItem( self.menu_help, wx.ID_ANY, u"更新说明", wx.EmptyString, wx.ITEM_NORMAL )
self.menu_help.Append( self.menu_item_update )
self.menu_bar.Append( self.menu_help, u"帮助(H)" )
self.SetMenuBar( self.menu_bar )
bSizer2 = wx.BoxSizer( wx.VERTICAL )
self.m_staticText2 = wx.StaticText( self, wx.ID_ANY, u"苍龙测试服发布工具", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText2.Wrap( -1 )
self.m_staticText2.SetFont( wx.Font( 15, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, wx.EmptyString ) )
bSizer2.Add( self.m_staticText2, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
fgSizer4 = wx.FlexGridSizer( 1, 2, 0, 0 )
fgSizer4.SetFlexibleDirection( wx.BOTH )
fgSizer4.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
fgSizer5 = wx.FlexGridSizer( 0, 2, 5, 0 )
fgSizer5.SetFlexibleDirection( wx.BOTH )
fgSizer5.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.m_staticText3 = wx.StaticText( self, wx.ID_ANY, u"版本选择:", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText3.Wrap( -1 )
fgSizer5.Add( self.m_staticText3, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
choi_releaChoices = [ u"日文", u"韩文", u"内网" ]
self.choi_relea = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.Size( 180,-1 ), choi_releaChoices, 0 )
self.choi_relea.SetSelection( 0 )
fgSizer5.Add( self.choi_relea, 0, wx.ALIGN_RIGHT|wx.TOP|wx.BOTTOM|wx.RIGHT, 5 )
fgSizer4.Add( fgSizer5, 1, wx.EXPAND, 5 )
fgSizer6 = wx.FlexGridSizer( 0, 2, 5, 0 )
fgSizer6.SetFlexibleDirection( wx.BOTH )
fgSizer6.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.m_staticText5 = wx.StaticText( self, wx.ID_ANY, u"服务器选择:", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText5.Wrap( -1 )
fgSizer6.Add( self.m_staticText5, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT, 5 )
choi_srvChoices = [ u"游戏1服", u"游戏2服", u"战斗服", u"列表服" ]
self.choi_srv = wx.Choice( self, wx.ID_ANY, wx.DefaultPosition, wx.Size( 180,-1 ), choi_srvChoices, 0 )
self.choi_srv.SetSelection( 0 )
fgSizer6.Add( self.choi_srv, 0, wx.ALL, 5 )
fgSizer4.Add( fgSizer6, 1, wx.EXPAND, 5 )
bSizer2.Add( fgSizer4, 0, 0, 5 )
fgSizer37 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer37.SetFlexibleDirection( wx.BOTH )
fgSizer37.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.m_staticText7 = wx.StaticText( self, wx.ID_ANY, u"文 件 夹:", wx.Point( -1,-1 ), wx.DefaultSize, 0 )
self.m_staticText7.Wrap( -1 )
fgSizer37.Add( self.m_staticText7, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.dir_picker = wx.DirPickerCtrl( self, wx.ID_ANY, wx.EmptyString, u"Select a folder", wx.DefaultPosition, wx.Size( 465,-1 ), wx.DIRP_CHANGE_DIR|wx.DIRP_DIR_MUST_EXIST|wx.DIRP_SMALL|wx.DIRP_USE_TEXTCTRL )
fgSizer37.Add( self.dir_picker, 0, wx.ALL, 5 )
bSizer2.Add( fgSizer37, 0, wx.EXPAND, 5 )
fgSizer38 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer38.SetFlexibleDirection( wx.BOTH )
fgSizer38.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
fgSizer39 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer39.SetFlexibleDirection( wx.BOTH )
fgSizer39.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
fgSizer39.SetMinSize( wx.Size( 260,-1 ) )
fgSizer9 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer9.SetFlexibleDirection( wx.BOTH )
fgSizer9.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.m_staticText9 = wx.StaticText( self, wx.ID_ANY, u"状 态:", wx.Point( -1,-1 ), wx.DefaultSize, 0 )
self.m_staticText9.Wrap( -1 )
fgSizer9.Add( self.m_staticText9, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.text_status = wx.StaticText( self, wx.ID_ANY, u"未开始", wx.Point( -1,-1 ), wx.DefaultSize, 0 )
self.text_status.Wrap( -1 )
fgSizer9.Add( self.text_status, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
fgSizer39.Add( fgSizer9, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL|wx.TOP|wx.BOTTOM|wx.RIGHT, 5 )
self.btn_start = wx.Button( self, wx.ID_ANY, u"开始发布", wx.Point( -1,-1 ), wx.DefaultSize, 0 )
fgSizer39.Add( self.btn_start, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 )
fgSizer38.Add( fgSizer39, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 5 )
fgSizer41 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer41.SetFlexibleDirection( wx.BOTH )
fgSizer41.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
fgSizer10 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer10.SetFlexibleDirection( wx.BOTH )
fgSizer10.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.check_save_path = wx.CheckBox( self, wx.ID_ANY, u"记住文件夹 |", wx.DefaultPosition, wx.DefaultSize, 0 )
fgSizer10.Add( self.check_save_path, 0, wx.TOP|wx.RIGHT, 5 )
self.check_csv = wx.CheckBox( self, wx.ID_ANY, u"发布CSV", wx.DefaultPosition, wx.DefaultSize, 0 )
self.check_csv.Enable( False )
fgSizer10.Add( self.check_csv, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_BOTTOM|wx.EXPAND|wx.TOP, 5 )
fgSizer41.Add( fgSizer10, 1, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.TOP, 5 )
fgSizer8 = wx.FlexGridSizer( 0, 2, 0, 0 )
fgSizer8.SetFlexibleDirection( wx.BOTH )
fgSizer8.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
self.jdk_static_text = wx.StaticText( self, wx.ID_ANY, u"| 切换Maven", wx.DefaultPosition, wx.DefaultSize, 0 )
self.jdk_static_text.Wrap( -1 )
self.jdk_static_text.Enable( False )
fgSizer8.Add( self.jdk_static_text, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL|wx.TOP|wx.RIGHT, 5 )
self.maven_picker = wx.DirPickerCtrl( self, wx.ID_ANY, wx.EmptyString, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.DIRP_DIR_MUST_EXIST|wx.DIRP_SMALL )
self.maven_picker.Enable( False )
fgSizer8.Add( self.maven_picker, 0, wx.TOP, 5 )
fgSizer41.Add( fgSizer8, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )
fgSizer38.Add( fgSizer41, 1, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )
bSizer2.Add( fgSizer38, 0, wx.EXPAND, 5 )
sbSizer2 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"发布文件" ), wx.VERTICAL )
self.text_files = wx.TextCtrl( sbSizer2.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE|wx.TE_READONLY )
sbSizer2.Add( self.text_files, 1, wx.ALL|wx.EXPAND, 5 )
bSizer2.Add( sbSizer2, 1, wx.EXPAND, 5 )
sbSizer4 = wx.StaticBoxSizer( wx.StaticBox( self, wx.ID_ANY, u"发布结果" ), wx.VERTICAL )
self.text_result = wx.TextCtrl( sbSizer4.GetStaticBox(), wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_MULTILINE|wx.TE_READONLY )
sbSizer4.Add( self.text_result, 1, wx.ALL|wx.EXPAND, 5 )
bSizer2.Add( sbSizer4, 1, wx.EXPAND, 5 )
self.SetSizer( bSizer2 )
self.Layout()
self.Centre( wx.BOTH )
# Connect Events
self.Bind( wx.EVT_CLOSE, self.tool_close )
self.Bind( wx.EVT_MENU, self.his_select, id = self.menu_item_history.GetId() )
self.Bind( wx.EVT_MENU, self.edit_info_select, id = self.menu_item_edit_info.GetId() )
self.Bind( wx.EVT_MENU, self.update_select, id = self.menu_item_update.GetId() )
self.choi_relea.Bind( wx.EVT_CHOICE, self.on_release_chosen )
self.choi_srv.Bind( wx.EVT_CHOICE, self.on_srv_chosen )
self.dir_picker.Bind( wx.EVT_DIRPICKER_CHANGED, self.event_dir_changed )
self.btn_start.Bind( wx.EVT_BUTTON, self.start )
self.maven_picker.Bind( wx.EVT_DIRPICKER_CHANGED, self.event_jdk_changed )
def __del__( self ):
pass
# Virtual event handlers, overide them in your derived class
def tool_close( self, event ):
event.Skip()
def his_select( self, event ):
event.Skip()
def edit_info_select( self, event ):
event.Skip()
def update_select( self, event ):
event.Skip()
def on_release_chosen( self, event ):
event.Skip()
def on_srv_chosen( self, event ):
event.Skip()
def event_dir_changed( self, event ):
event.Skip()
def start( self, event ):
event.Skip()
def event_jdk_changed( self, event ):
event.Skip()