1 # -*- coding: utf-8 -*-
4 # 2013/12/15 written by kei9
10 from notebookflowview import NoteBookFlowView
11 from notebooksettingview import NoteBookSettingView
12 from notebookseed1view import NoteBookSeed1View
13 from notebookseed2view import NoteBookSeed2View
14 from notebookskill2view import NoteBookSkill2View
15 from notebookamuletview import NoteBookAmuletView
17 class MainFrameView():
19 def __init__(self, filename):
20 self.res = wx.xrc.XmlResource(filename)
23 def _init_frame(self):
25 self.frame = self.res.LoadFrame(None, "MainFrame")
26 self.note_book = xrc.XRCCTRL(self.frame, "NoteBookMain")
29 self.ID_MENU_ITEM_EXIT = xrc.XRCID("wxID_EXIT") # same as wx.ID_EXIT
30 self.ID_MENU_ITEM_ABOUT = xrc.XRCID("wxID_ABOUT") # same as wx.ID_ABOUT
33 self.notebook_seed1_view = NoteBookSeed1View(self.frame)
36 self.notebook_seed2_view = NoteBookSeed2View(self.frame)
38 # skill2 search from seed2 view
39 self.notebook_skill2_view = NoteBookSkill2View(self.frame)
42 self.notebook_amulet_view = NoteBookAmuletView(self.frame)
45 self.notebook_flow_view = NoteBookFlowView(self.frame)
48 self.notebook_setting_view = NoteBookSettingView(self.frame)
54 self.frame.Close(True)
56 def DisableNoteBook(self):
57 self.note_book.Disable()
59 def EnableNoteBook(self):
60 self.note_book.Enable()
62 def OnAboutBox(self, evt):
63 u""" Show About Box """
64 info = wx.AboutDialogInfo()
65 info.Name = constnumbers.NAME
66 info.Version = constnumbers.VERSION
67 info.Copyright = constnumbers.COPYRIGHT
68 info.Description = constnumbers.DESCRIPTION
69 info.WebSite = (constnumbers.WEBSITE_LINK, constnumbers.WEBSITE_TEXT)
70 info.Developers = constnumbers.DEVELOPERS
71 info.License = constnumbers.LICENSE_TEXT
74 def GetAboutInfo(self):
75 u""" create About info """
76 info = wx.AboutDialogInfo()
77 info.Name = constnumbers.NAME
78 info.Version = constnumbers.VERSION
79 info.Copyright = constnumbers.COPYRIGHT
80 info.Description = constnumbers.DESCRIPTION
81 info.WebSite = (constnumbers.WEBSITE_LINK, constnumbers.WEBSITE_TEXT)
82 info.Developers = constnumbers.DEVELOPERS
83 info.License = constnumbers.LICENSE_TEXT
86 if __name__ == "__main__":
88 mainframe = MainFrameView(u"mainframe.xrc")