def main(): from model import Model Model.StaticInit() app = wx.PySimpleApp() frame = wx.Frame(None, -1, 'dest') pane = DestPane(frame) frame.Show() app.MainLoop()
def OnInit(self): logging.basicConfig( \ # level = logging.DEBUG \ filename = "remapper.log" \ ) Model.StaticInit() frame = MainFrame() frame.Show() return True
def NotifyModelChange(self, notification): self.layers = [map.ids[-1] for map in Model.keyboard.maps] def NotifyKeyUpdate(self, notification): if notification != None: keyId = notification.eid else: keyId = "No selection" self.keyIdTxt.SetLabel("Key id: %s" % keyId) def OnChangeLayer(self, event): choice = event.GetEventObject() layer = choice.GetStringSelection() LayerChangeNotification(layer).notify() def NotifyLayerChange(self, notification): idx = self.layersChoice.FindString(notification.layer) if self.layersChoice.GetSelection() != idx: self.layersChoice.SetSelection(idx) if __name__ == '__main__': app = wx.PySimpleApp() frame = wx.Frame(None, -1, "Info") from model import Model Model.StaticInit() info = InfoFrame(frame) frame.Show() info.Show() app.MainLoop()