PLCOpenEditor.py
changeset 1581 2295fdc5c271
parent 1580 f37b88d3edc6
child 1680 6db967480b7d
equal deleted inserted replaced
1580:f37b88d3edc6 1581:2295fdc5c271
   190         self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
   190         self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
   191 
   191 
   192         self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU)
   192         self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU)
   193 
   193 
   194         if result is not None:
   194         if result is not None:
   195             self.ShowErrorMessage(
   195             (num, line) = result
   196                 _("PLC syntax error at line %d:\n%s") % result)
   196             self.ShowErrorMessage(_("PLC syntax error at line {a1}:\n{a2}").format(a1 = num, a2 = line))
   197 
   197 
   198     def OnCloseFrame(self, event):
   198     def OnCloseFrame(self, event):
   199         if self.Controler is None or self.CheckSaveBeforeClosing(_("Close Application")):
   199         if self.Controler is None or self.CheckSaveBeforeClosing(_("Close Application")):
   200             self.AUIManager.UnInit()
   200             self.AUIManager.UnInit()
   201 
   201 
   303                 self._Refresh(PROJECTTREE, LIBRARYTREE)
   303                 self._Refresh(PROJECTTREE, LIBRARYTREE)
   304             self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU)
   304             self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU)
   305         dialog.Destroy()
   305         dialog.Destroy()
   306 
   306 
   307         if result is not None:
   307         if result is not None:
   308             self.ShowErrorMessage(
   308             (num, line) = result
   309                 _("PLC syntax error at line %d:\n%s") % result)
   309             self.ShowErrorMessage(_("PLC syntax error at line {a1}:\n{a2}").format(a1 = num, a2 = line))
   310 
   310 
   311     def OnCloseProjectMenu(self, event):
   311     def OnCloseProjectMenu(self, event):
   312         if not self.CheckSaveBeforeClosing():
   312         if not self.CheckSaveBeforeClosing():
   313             return
   313             return
   314         self.ResetView()
   314         self.ResetView()