def OnInit(self): self.SetAppName('plcopeneditor') self.ParseCommandLine() InstallLocalRessources(beremiz_dir) if wx.VERSION < (3, 0, 0): wx.InitAllImageHandlers() util.ExceptionHandler.AddExceptHook(version.app_version) self.frame = PLCOpenEditor(None, fileOpen=self.fileOpen) return True
def InitI18n(self): from util.misc import InstallLocalRessources InstallLocalRessources(self.app_dir)
fileOpen = None if len(args) > 1: usage() sys.exit() elif len(args) == 1: fileOpen = args[0] # Create wxApp (Need to create App before internationalization because of # Windows) if wx.VERSION >= (3, 0, 0): app = wx.App() else: app = wx.PySimpleApp() from util.misc import InstallLocalRessources InstallLocalRessources(beremiz_dir) from docutil import * from IDEFrame import IDEFrame, AppendMenu from IDEFrame import TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU, PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE, PAGETITLES from IDEFrame import EncodeFileSystemPath, DecodeFileSystemPath from editors.Viewer import Viewer from PLCControler import PLCControler from dialogs import ProjectDialog from dialogs.AboutDialog import ShowAboutDialog #------------------------------------------------------------------------------- # PLCOpenEditor Main Class #------------------------------------------------------------------------------- # Define PLCOpenEditor FileMenu extra items id