|
|
@ -40,7 +40,7 @@ class UI_Algorithm(wx.Dialog): |
|
|
|
self.staticText2 = wx.StaticText(self.panel, label='包含纯水: ' ,size=(60, -1)) |
|
|
|
self.staticText2 = wx.StaticText(self.panel, label='包含纯水: ' ,size=(60, -1)) |
|
|
|
# self.staticText2_1 = wx.StaticText(self.panel, label='分钟 ' ,size=(60, -1)) |
|
|
|
# self.staticText2_1 = wx.StaticText(self.panel, label='分钟 ' ,size=(60, -1)) |
|
|
|
self.textCtrl2 = wx.TextCtrl(self.panel, value="",size=(250,25)) |
|
|
|
self.textCtrl2 = wx.TextCtrl(self.panel, value="",size=(250,25)) |
|
|
|
tmp = self.get_str_from_config( "algorithm", "2" ) |
|
|
|
tmp = self.get_str_from_config( "algorithm", "PureWater" ) |
|
|
|
if tmp is not None: |
|
|
|
if tmp is not None: |
|
|
|
self.textCtrl2.SetValue(tmp) |
|
|
|
self.textCtrl2.SetValue(tmp) |
|
|
|
self.hbox2.Add(self.staticText2, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
self.hbox2.Add(self.staticText2, flag=wx.TOP|wx.LEFT, border=5) |
|
|
@ -48,17 +48,17 @@ class UI_Algorithm(wx.Dialog): |
|
|
|
# self.hbox2.Add(self.staticText2_1, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
# self.hbox2.Add(self.staticText2_1, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
self.sbs.Add(self.hbox2, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
self.sbs.Add(self.hbox2, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
|
|
|
|
|
|
|
|
self.hbox3 = wx.BoxSizer(wx.HORIZONTAL) |
|
|
|
# self.hbox3 = wx.BoxSizer(wx.HORIZONTAL) |
|
|
|
self.staticText3 = wx.StaticText(self.panel, label='纯水: ' ,size=(60, -1)) |
|
|
|
# self.staticText3 = wx.StaticText(self.panel, label='纯水: ' ,size=(60, -1)) |
|
|
|
# self.staticText2_1 = wx.StaticText(self.panel, label='分钟 ' ,size=(60, -1)) |
|
|
|
# # self.staticText2_1 = wx.StaticText(self.panel, label='分钟 ' ,size=(60, -1)) |
|
|
|
self.textCtrl3 = wx.TextCtrl(self.panel, value="",size=(250,25)) |
|
|
|
# self.textCtrl3 = wx.TextCtrl(self.panel, value="",size=(250,25)) |
|
|
|
tmp = self.get_str_from_config( "algorithm", "3" ) |
|
|
|
# tmp = self.get_str_from_config( "algorithm", "PureWater2" ) |
|
|
|
if tmp is not None: |
|
|
|
# if tmp is not None: |
|
|
|
self.textCtrl3.SetValue(tmp) |
|
|
|
# self.textCtrl3.SetValue(tmp) |
|
|
|
self.hbox3.Add(self.staticText3, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
# self.hbox3.Add(self.staticText3, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
self.hbox3.Add(self.textCtrl3,flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
# self.hbox3.Add(self.textCtrl3,flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
# self.hbox2.Add(self.staticText2_1, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
# # self.hbox2.Add(self.staticText2_1, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
self.sbs.Add(self.hbox3, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
# self.sbs.Add(self.hbox3, flag=wx.TOP|wx.LEFT, border=5) |
|
|
|
|
|
|
|
|
|
|
|
self.panel.SetSizer(self.sbs) |
|
|
|
self.panel.SetSizer(self.sbs) |
|
|
|
|
|
|
|
|
|
|
@ -101,9 +101,9 @@ class UI_Algorithm(wx.Dialog): |
|
|
|
def OnSave(self, e): |
|
|
|
def OnSave(self, e): |
|
|
|
success = True |
|
|
|
success = True |
|
|
|
# 赋值字典,写入文件 |
|
|
|
# 赋值字典,写入文件 |
|
|
|
self.set_config_by_section_key_val( 'algorithm',"1",self.textCtrl1.GetValue( ) ) |
|
|
|
self.set_config_by_section_key_val( 'algorithm',"A720",self.textCtrl1.GetValue( ) ) |
|
|
|
self.set_config_by_section_key_val( 'algorithm',"2",self.textCtrl2.GetValue( ) ) |
|
|
|
self.set_config_by_section_key_val( 'algorithm',"PureWater",self.textCtrl2.GetValue( ) ) |
|
|
|
self.set_config_by_section_key_val( 'algorithm',"3",self.textCtrl2.GetValue( ) ) |
|
|
|
# self.set_config_by_section_key_val( 'algorithm',"3",self.textCtrl2.GetValue( ) ) |
|
|
|
self.config.write_yaml(self.config_yml) |
|
|
|
self.config.write_yaml(self.config_yml) |
|
|
|
del self.config |
|
|
|
del self.config |
|
|
|
if success: |
|
|
|
if success: |
|
|
|