PLCOpenEditor.py
changeset 1730 64d8f52bc8c8
parent 1718 703ddaf48b00
child 1732 94ffe74e6895
equal deleted inserted replaced
1726:d51af006fa6b 1730:64d8f52bc8c8
   154             kind=wx.ITEM_NORMAL, text=_(u'PLCOpenEditor') + '\tF1')
   154             kind=wx.ITEM_NORMAL, text=_(u'PLCOpenEditor') + '\tF1')
   155         #AppendMenu(parent, help='', id=wx.ID_HELP_CONTENTS,
   155         #AppendMenu(parent, help='', id=wx.ID_HELP_CONTENTS,
   156         #      kind=wx.ITEM_NORMAL, text=u'PLCOpen\tF2')
   156         #      kind=wx.ITEM_NORMAL, text=u'PLCOpen\tF2')
   157         #AppendMenu(parent, help='', id=wx.ID_HELP_CONTEXT,
   157         #AppendMenu(parent, help='', id=wx.ID_HELP_CONTEXT,
   158         #      kind=wx.ITEM_NORMAL, text=u'IEC 61131-3\tF3')
   158         #      kind=wx.ITEM_NORMAL, text=u'IEC 61131-3\tF3')
   159         
   159 
   160         handler=lambda event: {
   160         handler=lambda event: {
   161             wx.MessageBox(version.GetCommunityHelpMsg(), _(u'Community support'), wx.OK | wx.ICON_INFORMATION)
   161             wx.MessageBox(version.GetCommunityHelpMsg(), _(u'Community support'), wx.OK | wx.ICON_INFORMATION)
   162         }
   162         }
   163         id = wx.NewId()
   163         id = wx.NewId()
   164         parent.Append(help='', id=id, kind=wx.ITEM_NORMAL, text=_(u'Community support'))        
   164         parent.Append(help='', id=id, kind=wx.ITEM_NORMAL, text=_(u'Community support'))
   165         self.Bind(wx.EVT_MENU, handler, id=id)
   165         self.Bind(wx.EVT_MENU, handler, id=id)
   166         
   166 
   167         AppendMenu(parent, help='', id=wx.ID_ABOUT,
   167         AppendMenu(parent, help='', id=wx.ID_ABOUT,
   168             kind=wx.ITEM_NORMAL, text=_(u'About'))
   168             kind=wx.ITEM_NORMAL, text=_(u'About'))
   169         self.Bind(wx.EVT_MENU, self.OnPLCOpenEditorMenu, id=wx.ID_HELP)
   169         self.Bind(wx.EVT_MENU, self.OnPLCOpenEditorMenu, id=wx.ID_HELP)
   170         #self.Bind(wx.EVT_MENU, self.OnPLCOpenMenu, id=wx.ID_HELP_CONTENTS)
   170         #self.Bind(wx.EVT_MENU, self.OnPLCOpenMenu, id=wx.ID_HELP_CONTENTS)
   171         self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT)
   171         self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT)
   503 
   503 
   504     frame = PLCOpenEditor(None, fileOpen=fileOpen)
   504     frame = PLCOpenEditor(None, fileOpen=fileOpen)
   505 
   505 
   506     frame.Show()
   506     frame.Show()
   507     app.MainLoop()
   507     app.MainLoop()
   508