#Boa:Frame:Frame1 import wx import wx.grid import Dialog_SendSMS import Dialog_SchSMS import Dialog_Transliterate import pdo def create(parent): return Frame1(parent) [wxID_FRAME1, wxID_FRAME1BTCONTACTS, wxID_FRAME1BTFILTER, wxID_FRAME1BTGO, wxID_FRAME1BTREPORT, wxID_FRAME1BTSENDSMS, wxID_FRAME1BTSMSSCH, wxID_FRAME1BTTRANSLIT, wxID_FRAME1NOTEBOOK1, wxID_FRAME1PANEL1, wxID_FRAME1PANEL2, wxID_FRAME1PANEL3, wxID_FRAME1PANEL4, wxID_FRAME1PHONESTAT, wxID_FRAME1SEARCHCTRL1, wxID_FRAME1STATICLINE1, wxID_FRAME1STATUSBAR1, ] = [wx.NewId() for _init_ctrls in range(17)] [wxID_FRAME1TOOLBAR1CONNECT] = [wx.NewId() for _init_coll_toolBar1_Tools in range(1)] [wxID_FRAME1PHONEMENUCONNECT] = [wx.NewId() for _init_coll_PhoneMenu_Items in range(1)] [wxID_FRAME1HELPMENUABOUT] = [wx.NewId() for _init_coll_HelpMenu_Items in range(1)] class Frame1(wx.Frame): def _init_coll_menuBar1_Menus(self, parent): # generated method, don't edit parent.Append(menu=self.PhoneMenu, title=u'Phone') parent.Append(menu=self.HelpMenu, title=u'Help') def _init_coll_HelpMenu_Items(self, parent): # generated method, don't edit parent.Append(help='', id=wxID_FRAME1HELPMENUABOUT, kind=wx.ITEM_NORMAL, text=u'About') self.Bind(wx.EVT_MENU, self.OnHelpMenuAboutMenu, id=wxID_FRAME1HELPMENUABOUT) def _init_coll_PhoneMenu_Items(self, parent): # generated method, don't edit parent.Append(help=u'', id=wxID_FRAME1PHONEMENUCONNECT, kind=wx.ITEM_NORMAL, text=u'Connect') self.Bind(wx.EVT_MENU, self.OnPhoneMenuConnectMenu, id=wxID_FRAME1PHONEMENUCONNECT) def _init_coll_statusBar1_Fields(self, parent): # generated method, don't edit parent.SetFieldsCount(1) parent.SetStatusText(number=0, text=u'Status Bar') parent.SetStatusWidths([-1]) def _init_utils(self): # generated method, don't edit self.menuBar1 = wx.MenuBar() self.PhoneMenu = wx.Menu(title=u'') self.HelpMenu = wx.Menu(title=u'') self._init_coll_menuBar1_Menus(self.menuBar1) self._init_coll_PhoneMenu_Items(self.PhoneMenu) self._init_coll_HelpMenu_Items(self.HelpMenu) def _init_ctrls(self, prnt): # generated method, don't edit wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt, pos=wx.Point(488, 264), size=wx.Size(613, 538), style=wx.DEFAULT_FRAME_STYLE | wx.STATIC_BORDER, title=u'SMS CenTraL') self._init_utils() self.SetClientSize(wx.Size(605, 504)) self.SetToolTipString(u'Frame1') self.SetStatusBarPane(0) self.SetMenuBar(self.menuBar1) self.statusBar1 = wx.StatusBar(id=wxID_FRAME1STATUSBAR1, name='statusBar1', parent=self, style=0) self._init_coll_statusBar1_Fields(self.statusBar1) self.SetStatusBar(self.statusBar1) self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self, pos=wx.Point(0, 0), size=wx.Size(605, 461), style=wx.TAB_TRAVERSAL) self.panel2 = wx.Panel(id=wxID_FRAME1PANEL2, name='panel2', parent=self.panel1, pos=wx.Point(0, 0), size=wx.Size(104, 456), style=wx.TAB_TRAVERSAL) self.btReport = wx.Button(id=wxID_FRAME1BTREPORT, label=u'Report', name=u'btReport', parent=self.panel2, pos=wx.Point(8, 136), size=wx.Size(87, 56), style=0) self.btReport.Bind(wx.EVT_BUTTON, self.OnReportGenButton, id=wxID_FRAME1BTREPORT) self.btFilter = wx.Button(id=wxID_FRAME1BTFILTER, label=u'Create filter', name=u'btFilter', parent=self.panel2, pos=wx.Point(8, 264), size=wx.Size(87, 56), style=0) self.btFilter.Bind(wx.EVT_BUTTON, self.OnFilterButton, id=wxID_FRAME1BTFILTER) self.btSendSMS = wx.Button(id=wxID_FRAME1BTSENDSMS, label=u'Send SMS', name=u'btSendSMS', parent=self.panel2, pos=wx.Point(8, 72), size=wx.Size(88, 56), style=0) self.btSendSMS.Bind(wx.EVT_BUTTON, self.OnSendSMSButton, id=wxID_FRAME1BTSENDSMS) self.btTranslit = wx.Button(id=wxID_FRAME1BTTRANSLIT, label=u'Transliterate', name=u'btTranslit', parent=self.panel2, pos=wx.Point(8, 392), size=wx.Size(87, 56), style=0) self.btTranslit.Bind(wx.EVT_BUTTON, self.OnBtTranslitButton, id=wxID_FRAME1BTTRANSLIT) self.btSMSSch = wx.Button(id=wxID_FRAME1BTSMSSCH, label=u'SMS Scheduler', name=u'btSMSSch', parent=self.panel2, pos=wx.Point(8, 200), size=wx.Size(87, 56), style=0) self.btSMSSch.Bind(wx.EVT_BUTTON, self.OnSMSSchButton, id=wxID_FRAME1BTSMSSCH) self.btContacts = wx.Button(id=wxID_FRAME1BTCONTACTS, label=u'Contacts', name=u'btContacts', parent=self.panel2, pos=wx.Point(8, 328), size=wx.Size(87, 56), style=0) self.panel3 = wx.Panel(id=wxID_FRAME1PANEL3, name='panel3', parent=self.panel1, pos=wx.Point(112, 0), size=wx.Size(487, 40), style=wx.TAB_TRAVERSAL) self.btGo = wx.Button(id=wxID_FRAME1BTGO, label=u'Go', name=u'btGo', parent=self.panel3, pos=wx.Point(424, 16), size=wx.Size(51, 23), style=0) self.staticLine1 = wx.StaticLine(id=wxID_FRAME1STATICLINE1, name='staticLine1', parent=self.panel1, pos=wx.Point(112, 48), size=wx.Size(480, 2), style=wx.LI_VERTICAL) self.panel4 = wx.Panel(id=wxID_FRAME1PANEL4, name='panel4', parent=self.panel1, pos=wx.Point(104, 56), size=wx.Size(496, 408), style=wx.TAB_TRAVERSAL) self.notebook1 = wx.Notebook(id=wxID_FRAME1NOTEBOOK1, name='notebook1', parent=self.panel4, pos=wx.Point(8, 8), size=wx.Size(484, 384), style=0) self.searchCtrl1 = wx.SearchCtrl(id=wxID_FRAME1SEARCHCTRL1, name='searchCtrl1', parent=self.panel3, pos=wx.Point(8, 16), size=wx.Size(408, 21), style=0, value=u'Search') self.PhoneStat = wx.StaticBitmap(bitmap=wx.NullBitmap, id=wxID_FRAME1PHONESTAT, name=u'PhoneStat', parent=self.panel2, pos=wx.Point(8, 8), size=wx.Size(88, 49), style=wx.RAISED_BORDER) def __init__(self, parent): self._init_ctrls(parent) def OnPhoneMenuConnectMenu(self, event): event.Skip() def OnHelpMenuAboutMenu(self, event): event.Skip() def OnSendSMSButton(self, event): dlg = Dialog_SendSMS.Dialog1(self) try: dlg.ShowModal() finally: dlg.Destroy() def Inbox(self): ## db=pdo.connect("Module=MySQLdb;User=root;Passwd=;DB=MTH") ## if db.active: ## strSelect = "SELECT * FROM inbox" ## rs=db.openRS(strSelect) ## r=0 ## while rs.next(): ## self.grid1.SetCellValue(r,0,rs.fields['ReceivingDateTime'].value) ## self.grid1.SetCellValue(r,1,rs.fields['SenderNumber'].value) ## self.grid1.SetCellValue(r,2,rs.fields['TextDecoded'].value) #### print rs.fields['SenderNumber'].value #### print rs.fields['TimeReceived'].value #### print rs.fields['TextDecoded'].value event.Skip() def OnReportGenButton(self, event): event.Skip() def OnSMSSchButton(self, event): dlg = Dialog_SchSMS.Dialog2(self) try: dlg.ShowModal() finally: dlg.Destroy() def OnFilterButton(self, event): event.Skip() def OnBtTranslitButton(self, event): dlg = Dialog_Transliterate.Dialog3(self) try: dlg.ShowModal() finally: dlg.Destroy() if __name__ == '__main__': app = wx.PySimpleApp() frame = create(None) frame.Show() app.MainLoop()