-
Notifications
You must be signed in to change notification settings - Fork 11
/
UserConfigManager.py
58 lines (35 loc) · 1.23 KB
/
UserConfigManager.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
# All works in this code have been curated by ECCC and licensed under the GNU General Public License v3.0.
# Read more: https://www.gnu.org/licenses/gpl-3.0.en.html
from UserConfigPanel import *
class UserConfigManager(object):
def __init__(self, mode, gui, manager=None):
self.gui = gui
self.gui.manager = self
self.manager = manager
self.mode = mode
self.Init()
def Init(self):
if self.mode == "DEBUG":
print("UserConfigControl")
#Station Number
@property
def stationNumCtrl(self):
return self.gui.stationNumCtrl.GetValue()
@stationNumCtrl.setter
def stationNumCtrl(self, stationNumCtrl):
self.gui.stationNumCtrl.SetValue(stationNumCtrl)
#Station Name
@property
def stationNameCtrl(self):
return self.gui.stationNameCtrl.GetValue()
@stationNameCtrl.setter
def stationNameCtrl(self, stationNameCtrl):
self.gui.stationNameCtrl.SetValue(stationNameCtrl)
def main():
app = wx.App()
frame = wx.Frame(None, size=(500, 400))
UserConfigManager("DEBUG", UserConfigPanel("DEBUG", wx.LANGUAGE_FRENCH, frame))
frame.Show()
app.MainLoop()
if __name__ == "__main__":
main()