equal
deleted
inserted
replaced
21 #You should have received a copy of the GNU General Public |
21 #You should have received a copy of the GNU General Public |
22 #License along with this library; if not, write to the Free Software |
22 #License along with this library; if not, write to the Free Software |
23 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 |
24 |
25 import os, sys, getopt |
25 import os, sys, getopt |
26 from threading import Thread |
26 from threading import Thread,Timer |
27 |
27 |
28 def usage(): |
28 def usage(): |
29 print """ |
29 print """ |
30 Usage of Beremiz PLC execution service :\n |
30 Usage of Beremiz PLC execution service :\n |
31 %s {[-n servicename] [-i IP] [-p port] [-x enabletaskbar] [-a autostart]|-h|--help} working_dir |
31 %s {[-n servicename] [-i IP] [-p port] [-x enabletaskbar] [-a autostart]|-h|--help} working_dir |
414 evt.Skip() |
414 evt.Skip() |
415 |
415 |
416 def OnTaskBarQuit(self, evt): |
416 def OnTaskBarQuit(self, evt): |
417 Thread(target=self.pyroserver.Quit).start() |
417 Thread(target=self.pyroserver.Quit).start() |
418 self.RemoveIcon() |
418 self.RemoveIcon() |
419 wx.CallAfter(wx.GetApp().Exit) |
419 Timer(1, wx.CallAfter(wx.GetApp().Exit)).start() |
420 evt.Skip() |
420 evt.Skip() |
421 |
421 |
422 def UpdateIcon(self, plcstatus): |
422 def UpdateIcon(self, plcstatus): |
423 if plcstatus is "Started" : |
423 if plcstatus is "Started" : |
424 currenticon = self.MakeIcon(starticon.GetImage()) |
424 currenticon = self.MakeIcon(starticon.GetImage()) |