equal
deleted
inserted
replaced
304 print _("PLC is not started.") |
304 print _("PLC is not started.") |
305 |
305 |
306 def OnTaskBarChangeInterface(self, evt): |
306 def OnTaskBarChangeInterface(self, evt): |
307 ip_addr = self.pyroserver.ip_addr |
307 ip_addr = self.pyroserver.ip_addr |
308 ip_addr = '' if ip_addr is None else ip_addr |
308 ip_addr = '' if ip_addr is None else ip_addr |
309 dlg = ParamsEntryDialog(None, _("Enter the IP of the interface to bind"), defaultValue=ip_addr) |
309 dlg = ParamsEntryDialog(None, _("Enter the IP of the interface to bind"), defaultValue=ip_addr) |
310 dlg.SetTests([(re.compile('\d{1,3}(?:\.\d{1,3}){3}$').match, _("IP is not valid!")), |
310 dlg.SetTests([(re.compile('\d{1,3}(?:\.\d{1,3}){3}$').match, _("IP is not valid!")), |
311 ( lambda x :len([x for x in x.split(".") if 0 <= int(x) <= 255]) == 4, _("IP is not valid!")) |
311 ( lambda x :len([x for x in x.split(".") if 0 <= int(x) <= 255]) == 4, _("IP is not valid!")) |
312 ]) |
312 ]) |
313 if dlg.ShowModal() == wx.ID_OK: |
313 if dlg.ShowModal() == wx.ID_OK: |
314 self.pyroserver.ip_addr = dlg.GetValue() |
314 self.pyroserver.ip_addr = dlg.GetValue() |