ProjectController.py
changeset 1928 ef6902c824f2
parent 1902 2b7e2db31d81
child 1948 b9a3f771aaab
equal deleted inserted replaced
1927:5def24850a28 1928:ef6902c824f2
  1806 
  1806 
  1807     def _Disconnect(self):
  1807     def _Disconnect(self):
  1808         self._SetConnector(None)
  1808         self._SetConnector(None)
  1809 
  1809 
  1810     def _Transfer(self):
  1810     def _Transfer(self):
       
  1811         if self.IsPLCStarted():
       
  1812             dialog = wx.MessageDialog(
       
  1813                 self.AppFrame, 
       
  1814                 _("Cannot transfer while PLC is running. Stop it now?"), 
       
  1815                 style=wx.YES_NO|wx.CENTRE)
       
  1816             if dialog.ShowModal() == wx.ID_YES:
       
  1817                 self._Stop()
       
  1818             else:
       
  1819                 return
       
  1820 
  1811         # Get the last build PLC's
  1821         # Get the last build PLC's
  1812         MD5 = self.GetLastBuildMD5()
  1822         MD5 = self.GetLastBuildMD5()
  1813 
  1823 
  1814         # Check if md5 file is empty : ask user to build PLC
  1824         # Check if md5 file is empty : ask user to build PLC
  1815         if MD5 is None:
  1825         if MD5 is None: