Example #1
0
    def set_visualization_mode(self):
        self.sbox_mv = wx.StaticBox(self, -1, L('DISPLAY_MODE'))
        sboxs_mv = wx.StaticBoxSizer(self.sbox_mv, wx.HORIZONTAL)

        # Here we create a panel and a notebook on the panel
        p = wx.Panel(self)
        nb = wx.Choicebook(p, -1)

        # add the pages to the notebook with the label to show on the tab
        self.page_cluster = ClusterPage(nb, self)
        nb.AddPage(self.page_cluster, "Clusters")
        self.page_resumes = SummaryPage(nb, self)
        nb.AddPage(self.page_resumes, L('SUMMARIES'))
        self.page_cluster_sumary = ClusterSummaryPage(nb, self)
        nb.AddPage(self.page_cluster_sumary, L('CLUSTERS_AND_SUMMARIES'))

        nb.Bind(wx.EVT_CHOICEBOOK_PAGE_CHANGED, self.on_page_changed)
        self.nb = nb

        # finally, put the notebook in a sizer for the panel to manage
        # the layout
        sizer = wx.BoxSizer()
        sizer.Add(nb, 1, wx.EXPAND | wx.EXPAND, 5)
        p.SetSizer(sizer)

        sboxs_mv.Add(p, 1, wx.ALL | wx.EXPAND, 5)
        return sboxs_mv
Example #2
0
    def __init_ctrls(self):
        intro_txt = 'Select and configure the database system you want to use.\nNote: wxPos will not create the database for you.'
        self.introTxt = wx.StaticText(self, -1, label=intro_txt)

        self.profileChoice = wx.Choice(self, -1)
        self.profileChoice.Bind(wx.EVT_CHOICE, self.OnProfileChoice)

        self.addProfileBtn = wx.Button(self, -1, '+')
        self.addProfileBtn.Bind(wx.EVT_BUTTON, self.OnAddButton)
        self.removeProfileBtn = wx.Button(self, -1, '-')
        self.removeProfileBtn.Bind(wx.EVT_BUTTON, self.OnRemoveButton)

        self.nameTxt = wx.TextCtrl(self, -1)

        self.panelBook = wx.Choicebook(self, -1)
        self.addOption('sqlite', 'Sqlite',
                       SqliteConfigPanel(self.panelBook, self.getProfile))
        self.addOption('mysql', 'MySQL',
                       MySQLConfigPanel(self.panelBook, self.getProfile))
        self.addOption('postgresql', 'PostgreSQL',
                       PostgreSQLConfigPanel(self.panelBook, self.getProfile))
        self.addOption('mssql', 'Microsoft SQL Server',
                       MsSQLConfigPanel(self.panelBook, self.getProfile))
        self.addOption('firebird', 'Firebird',
                       FirebirdConfigPanel(self.panelBook, self.getProfile))

        self.okBtn = wx.Button(self, wx.ID_OK, label='OK')
        self.okBtn.Bind(wx.EVT_BUTTON, self.OnOkButton)

        self.cancelBtn = wx.Button(self, wx.ID_CANCEL, label='Cancel')
Example #3
0
    def __init__(self, state, title):
        self.state = state
        wx.Frame.__init__(self,
                          None,
                          title=title,
                          size=(350, 400),
                          style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER)

        #use tabs for the individual checklists
        self.createLists()
        self.panel = wx.Panel(self)
        self.nb = wx.Choicebook(self.panel, wx.ID_ANY)

        #create the tabs
        self.createWidgets()

        #assign events to the buttons on the tabs
        self.createActions()

        #add in the pipe from MAVProxy
        self.timer = wx.Timer(self)
        #self.Bind(wx.EVT_TIMER, self.on_timer, self.timer)
        self.Bind(wx.EVT_TIMER,
                  lambda evt, notebook=self.nb: self.on_timer(evt, notebook),
                  self.timer)
        self.timer.Start(100)

        # finally, put the notebook in a sizer for the panel to manage
        # the layout
        sizer = wx.BoxSizer()
        sizer.Add(self.nb, 1, wx.EXPAND)
        self.panel.SetSizer(sizer)

        self.Show(True)
        self.pending = []
Example #4
0
    def test_choicebk4(self):
        book = wx.Choicebook(self.frame)
        book.AddPage(wx.Panel(book), 'one')
        book.AddPage(wx.Panel(book), 'two')

        choice = book.GetChoiceCtrl()
        assert isinstance(choice, wx.Choice)
Example #5
0
	def add_wgts(self, name, wgts):
		book = wx.Choicebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.CHB_DEFAULT )
		for name, wgt in wgts:
			book.AddPage(wgt(book, self.app), name, False )
		self.GetSizer().Add( book, 0, wx.EXPAND |wx.ALL, 0 )
		self.Layout()
		self.GetSizer().Fit(self)
Example #6
0
 def __layout(self):
   sizer = wx.BoxSizer(orient=wx.HORIZONTAL)
   panel_left = wx.Choicebook(self, -1)
   panel_left.Add(self._GeneralDetails())
   if is_authoriser():
     panel_left.Add(self._AddressDetails())
   panel_left.Add(self._HistoryDetails())
   panel_right = wx.Panel(self)
   panel_right.Add(self.MemberPhoto)
   panel_right.Add(self.MemberNumber)
   sizer.Add(panel_left)
   sizer.Add(panel_right)
   self.SetSizer(sizer)
Example #7
0
def build_widgets_panel(parent, datas):
    wpanel = wx.ScrolledWindow(parent, wx.ID_ANY, wx.DefaultPosition,
                               wx.DefaultSize, wx.HSCROLL | wx.VSCROLL)
    wpanel.SetScrollRate(5, 5)
    sizer = wx.BoxSizer(wx.VERTICAL)
    for i in datas[1]:
        choicebook = wx.Choicebook(wpanel, wx.ID_ANY, wx.DefaultPosition,
                                   wx.DefaultSize, wx.CHB_DEFAULT)
        build_widget(choicebook, i)
        sizer.Add(choicebook, 0, wx.EXPAND | wx.ALL, 0)
    wpanel.SetSizer(sizer)
    wpanel.Layout()
    sizer.Fit(wpanel)
    return wpanel
Example #8
0
    def __init__(self, parent, wxId, id, style):
        # The formatted tab area style uses another widget entirely.
        if style == TabArea.STYLE_FORMATTED:
            raise Exception('not supported here')

        # Create the appropriate widget.
        if style == TabArea.STYLE_ICON:
            w = wx.Listbook(parent, wxId, style=wx.LB_LEFT)
            w.GetListView().SetSingleStyle(wx.LC_AUTOARRANGE)
        elif style == TabArea.STYLE_HORIZ_ICON:
            w = wx.Listbook(parent, wxId, style=wx.LB_TOP)
        elif style == TabArea.STYLE_BASIC:
            w = wx.Notebook(parent, wxId)
        else:
            w = wx.Choicebook(parent, wxId, style=wx.CHB_TOP)

        base.Widget.__init__(self, w)

        self.style = style

        # The horizontal icon style is handled like the normal icon
        # style.
        if self.style == TabArea.STYLE_HORIZ_ICON:
            self.style = TabArea.STYLE_ICON

        # The IconTabs widget remembers its id so it can send
        # notifications events.
        self.widgetId = id

        # The panel map is used when figuring out the IDs of each page
        # when an event occurs.  It contains an ordered array of
        # tuples: (identifier, panel).
        self.panelMap = []
        self.tabAreas = {}

        if self.style == TabArea.STYLE_ICON:
            wx.EVT_LISTBOOK_PAGE_CHANGED(parent, wxId, self.onTabChange)
            # The icon style uses the icons.
            w.SetImageList(wg.iconManager.getImageList())
        elif style == TabArea.STYLE_BASIC:
            wx.EVT_NOTEBOOK_PAGE_CHANGED(parent, wxId, self.onTabChange)
        else:
            wx.EVT_CHOICEBOOK_PAGE_CHANGED(parent, wxId, self.onTabChange)
Example #9
0
 def __init__(self, datos_conf, idioma = None):
     '''Constructor de clase'''
     titulo = t(u'vipera, un diseñador de aplicaciones para Python', idioma) #  datos_conf['titulo_aplic']
     wx.Frame.__init__(self, None, -1, title = titulo, size = wx.Size(1024,768))
     # Idioma.
     self.l = idioma
     # Barra de estado.
     self.barra_estado = barra_estado(self, idioma)
     aux = '%s %s (%s)' % (proy_por_defecto['NOMBRE_APLIC'], proy_por_defecto['VERSION'], proy_por_defecto['FECHA_CREACION'])
     self.barra_estado.set_texto_statusbar(aux, 1)
     self.SetStatusBar(self.barra_estado)
     # Centramos la ventana principal.
     self.Center(wx.CENTER_ON_SCREEN)
     # [16-08-2011] Incluimos ChoiceBook para elegir entre vipera y pyShell.
     self.choiceBook = wx.Choicebook(self, -1, style = wx.CHB_TOP|wx.FULL_REPAINT_ON_RESIZE )
     # Creamos el panel.
     self.panel = panel_principal(self.choiceBook, datos_conf, self.l)
     # Pyshell
     self.pyshell = panel_pyshell(self.choiceBook)
     # Panel de ingeniería inversa
     self.ing_inversa = panel_ing_inversa(self.choiceBook, datos_conf, idioma = self.l)
     # Panel de configuración de la aplicación
     self.conf_vipera = panel_conf_vipera_p(self.choiceBook, self, idioma = self.l)
     # Panel de gestión de proyectos (Nuevo, Abrir, Salvar)
     self.gestion_proy = panel_oper_proy_p(self.choiceBook , idioma = self.l)
     # Incluimos los paneles como hojas del choiceBook.
     self.choiceBook.AddPage(self.gestion_proy, t(u"Gestión de proyectos", self.l))
     self.choiceBook.AddPage(self.panel, t(u"Diseñador", self.l))
     self.choiceBook.AddPage(self.ing_inversa, t(u"Ingeniería inversa", self.l))        
     self.choiceBook.AddPage(self.pyshell, u"Python Shell")
     self.choiceBook.AddPage(self.conf_vipera, t(u"Configuración de la aplicación", self.l))
     # Creamos sizer.
     sizer = wx.BoxSizer(wx.VERTICAL)
     # Barras de herramientas.
     self.barra1 = wx.BoxSizer(wx.HORIZONTAL)
     # Incluimos barra1 en el sizer.        
     sizer.Add(self.barra1, 0, wx.EXPAND, 5)
     # Incluimos choicebook en el sizer.
     sizer.Add(self.choiceBook, 1, wx.EXPAND)
     # Añadimos el sizer al panel padre.
     self.SetSizer(sizer)
     sizer.Layout()
Example #10
0
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=wx.EmptyString,
                          pos=wx.DefaultPosition,
                          size=wx.Size(700, 500),
                          style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)

        choice_vbox = wx.BoxSizer(wx.VERTICAL)

        self.bl_choicebook = wx.Choicebook(self, wx.ID_ANY, wx.DefaultPosition,
                                           wx.DefaultSize, wx.CHB_DEFAULT)
        choice_vbox.Add(self.bl_choicebook, 1, wx.EXPAND, 0)

        ctrl_hbox = wx.BoxSizer(wx.HORIZONTAL)

        self.ok_btn = wx.Button(self, wx.ID_ANY, u"&OK", wx.DefaultPosition,
                                wx.DefaultSize, 0)
        ctrl_hbox.Add(self.ok_btn, 0, wx.ALL, 5)

        self.cancel_btn = wx.Button(self, wx.ID_ANY, u"&Cancel",
                                    wx.DefaultPosition, wx.DefaultSize, 0)
        ctrl_hbox.Add(self.cancel_btn, 0, wx.ALL, 5)

        choice_vbox.Add(ctrl_hbox, 0, wx.ALIGN_CENTER | wx.ALL, 5)

        self.SetSizer(choice_vbox)
        self.Layout()

        self.Centre(wx.BOTH)

        # Connect Events
        self.bl_choicebook.Bind(wx.EVT_CHOICEBOOK_PAGE_CHANGED,
                                self.bl_choicebookOnChoicebookPageChanged)
        self.ok_btn.Bind(wx.EVT_BUTTON, self.ok_btnOnButtonClick)
        self.cancel_btn.Bind(wx.EVT_BUTTON, self.cancel_btnOnButtonClick)
Example #11
0
    def set_filter_config(self):
        self.sbox_fc = wx.StaticBox(self, -1, L('FILTER_CONFIG'))
        sboxs_fc = wx.StaticBoxSizer(self.sbox_fc, wx.HORIZONTAL)

        p = wx.Panel(self)
        nb = wx.Choicebook(p, -1)

        _label = L('REPRESENTATIVITY_IN_QUANTITY')
        nb.AddPage(self.get_more_representative(nb), _label)

        _label = L('REPRESENTATIVITY_VALUES_OBJECTIVES')
        nb.AddPage(self.get_representative_per_obj(nb), _label)

        nb.Bind(wx.EVT_CHOICEBOOK_PAGE_CHANGED, self.on_page_changed)

        self.nb = nb

        sizer = wx.BoxSizer()
        sizer.Add(nb, 1, wx.EXPAND | wx.EXPAND, 5)
        p.SetSizer(sizer)

        sboxs_fc.Add(p, 1, wx.ALL | wx.EXPAND, 5)
        return sboxs_fc
Example #12
0
    def __init__(self, obj, *args, **kwargs):
        kwargs['style'] = wx.DEFAULT_DIALOG_STYLE
        wx.Dialog.__init__(self, *args, **kwargs)

        # Panels
        self.panelx = wx.Panel(self, -1)

        # Principal Controls
        self.keyCtrl = wx.TextCtrl(
            self.panelx, -1, "", validator=pieBibtexValidator(compulsory=True))
        self.keyAutoCb = wx.CheckBox(self.panelx, -1, label="Auto-generate")
        self.authorIsCorporateCb = wx.CheckBox(
            self.panelx, -1, label="Author is corporate entity")
        self.authorCtrl = wx.TextCtrl(
            self.panelx,
            -1,
            "",
            style=wx.TE_PROCESS_ENTER,
            validator=pieBibtexValidator(compulsory=True))
        self.authorSwapButton = wx.BitmapButton(
            self.panelx, -1,
            wx.ArtProvider.GetBitmap(wx.ART_GO_BACK, wx.ART_TOOLBAR, (16, 16)))
        self.authorAltCtrl = wx.TextCtrl(self.panelx,
                                         -1,
                                         "",
                                         style=wx.TE_READONLY)
        self.titleCtrl = wx.TextCtrl(
            self.panelx,
            -1,
            "",
            style=wx.TE_PROCESS_ENTER | wx.EXPAND,
            validator=pieBibtexValidator(compulsory=True))
        self.titleSwapButton = wx.BitmapButton(
            self.panelx, -1,
            wx.ArtProvider.GetBitmap(wx.ART_GO_BACK, wx.ART_TOOLBAR, (16, 16)))
        self.titleAltCtrl = wx.TextCtrl(self.panelx,
                                        -1,
                                        "",
                                        style=wx.TE_READONLY)
        self.datePicker = wx.DatePickerCtrl(self.panelx, -1)

        # The dynamic panel - construction
        self.choiceBook = wx.Choicebook(self.panelx, -1)
        self.panelref = []
        for k, v in bibtexfields.items():
            pan = PieFieldPanel(self.choiceBook, k, v)
            self.choiceBook.AddPage(pan, k.capitalize())
            self.panelref.append(k)

        self.abstractct = wx.TextCtrl(self.panelx,
                                      -1,
                                      '',
                                      style=wx.TE_MULTILINE)

        # Dialog controls
        self.btCancel = wx.Button(self.panelx, wx.ID_CANCEL, "Cancel")
        self.btOk = wx.Button(self.panelx, -1, "Ok")

        # Finish initialisation
        self.__set_properties()
        self.__do_layout()
        self.__fill_fields(obj)
        self.__do_bindings()
	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 500,463 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )

		self.SetSizeHints( wx.DefaultSize, wx.DefaultSize )

		bSizer2 = wx.BoxSizer( wx.VERTICAL )

		self.m_listbook1 = wx.Listbook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LB_DEFAULT )
		self.m_scrolledWindow3 = wx.ScrolledWindow( self.m_listbook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.m_scrolledWindow3.SetScrollRate( 5, 5 )
		gSizer4 = wx.GridSizer( 0, 2, 0, 0 )

		self.m_htmlWin2 = wx.html.HtmlWindow( self.m_scrolledWindow3, wx.ID_ANY, wx.DefaultPosition, wx.Size( 100,100 ), wx.html.HW_SCROLLBAR_AUTO )
		gSizer4.Add( self.m_htmlWin2, 0, wx.ALL, 5 )

		self.m_richText1 = wx.richtext.RichTextCtrl( self.m_scrolledWindow3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0|wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER|wx.WANTS_CHARS )
		gSizer4.Add( self.m_richText1, 1, wx.EXPAND |wx.ALL, 5 )

		self.m_toggleBtn1 = wx.ToggleButton( self.m_scrolledWindow3, wx.ID_ANY, u"Toggle me!", wx.DefaultPosition, wx.DefaultSize, 0 )
		gSizer4.Add( self.m_toggleBtn1, 0, wx.ALL, 5 )

		self.m_searchCtrl2 = wx.SearchCtrl( self.m_scrolledWindow3, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_searchCtrl2.ShowSearchButton( True )
		self.m_searchCtrl2.ShowCancelButton( False )
		gSizer4.Add( self.m_searchCtrl2, 0, wx.ALL, 5 )

		self.m_colourPicker1 = wx.ColourPickerCtrl( self.m_scrolledWindow3, wx.ID_ANY, wx.BLACK, wx.DefaultPosition, wx.DefaultSize, wx.CLRP_DEFAULT_STYLE )
		gSizer4.Add( self.m_colourPicker1, 0, wx.ALL, 5 )

		self.m_fontPicker1 = wx.FontPickerCtrl( self.m_scrolledWindow3, wx.ID_ANY, wx.NullFont, wx.DefaultPosition, wx.DefaultSize, wx.FNTP_DEFAULT_STYLE )
		self.m_fontPicker1.SetMaxPointSize( 100 )
		gSizer4.Add( self.m_fontPicker1, 0, wx.ALL, 5 )

		self.m_filePicker1 = wx.FilePickerCtrl( self.m_scrolledWindow3, wx.ID_ANY, u"D:\\python\\mywindows.py", u"Select a file", u"*.*", wx.DefaultPosition, wx.DefaultSize, wx.FLP_DEFAULT_STYLE )
		gSizer4.Add( self.m_filePicker1, 0, wx.ALL, 5 )

		self.m_dirPicker1 = wx.DirPickerCtrl( self.m_scrolledWindow3, wx.ID_ANY, u"D:\\python", u"Select a folder", wx.DefaultPosition, wx.DefaultSize, wx.DIRP_DEFAULT_STYLE )
		gSizer4.Add( self.m_dirPicker1, 0, wx.ALL, 5 )

		self.m_datePicker1 = wx.adv.DatePickerCtrl( self.m_scrolledWindow3, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.adv.DP_DEFAULT )
		gSizer4.Add( self.m_datePicker1, 0, wx.ALL, 5 )

		self.m_calendar1 = wx.adv.CalendarCtrl( self.m_scrolledWindow3, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.adv.CAL_SHOW_HOLIDAYS )
		gSizer4.Add( self.m_calendar1, 0, wx.ALL, 5 )


		self.m_scrolledWindow3.SetSizer( gSizer4 )
		self.m_scrolledWindow3.Layout()
		gSizer4.Fit( self.m_scrolledWindow3 )
		self.m_listbook1.AddPage( self.m_scrolledWindow3, u"a page", False )
		self.m_scrolledWindow4 = wx.ScrolledWindow( self.m_listbook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.m_scrolledWindow4.SetScrollRate( 5, 5 )
		gSizer5 = wx.GridSizer( 0, 2, 0, 0 )

		self.m_scrollBar1 = wx.ScrollBar( self.m_scrolledWindow4, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.SB_HORIZONTAL )
		gSizer5.Add( self.m_scrollBar1, 0, wx.ALL, 5 )

		self.m_spinCtrl1 = wx.SpinCtrl( self.m_scrolledWindow4, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 10, 2 )
		gSizer5.Add( self.m_spinCtrl1, 0, wx.ALL, 5 )

		self.m_spinCtrlDouble2 = wx.SpinCtrlDouble( self.m_scrolledWindow4, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 4.000000, 1 )
		self.m_spinCtrlDouble2.SetDigits( 0 )
		gSizer5.Add( self.m_spinCtrlDouble2, 0, wx.ALL, 5 )

		self.m_spinBtn1 = wx.SpinButton( self.m_scrolledWindow4, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
		gSizer5.Add( self.m_spinBtn1, 0, wx.ALL, 5 )

		self.m_hyperlink1 = wx.adv.HyperlinkCtrl( self.m_scrolledWindow4, wx.ID_ANY, u"xxx", u"http://teaching.bo-yuan.net/", wx.DefaultPosition, wx.DefaultSize, wx.adv.HL_DEFAULT_STYLE )
		gSizer5.Add( self.m_hyperlink1, 0, wx.ALL, 5 )

		self.m_genericDirCtrl2 = wx.GenericDirCtrl( self.m_scrolledWindow4, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.DIRCTRL_3D_INTERNAL|wx.SUNKEN_BORDER, wx.EmptyString, 0 )

		self.m_genericDirCtrl2.ShowHidden( False )
		gSizer5.Add( self.m_genericDirCtrl2, 1, wx.EXPAND |wx.ALL, 5 )


		self.m_scrolledWindow4.SetSizer( gSizer5 )
		self.m_scrolledWindow4.Layout()
		gSizer5.Fit( self.m_scrolledWindow4 )
		self.m_listbook1.AddPage( self.m_scrolledWindow4, u"a page", False )
		self.m_scrolledWindow5 = wx.ScrolledWindow( self.m_listbook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.m_scrolledWindow5.SetScrollRate( 5, 5 )
		gSizer6 = wx.GridSizer( 0, 2, 0, 0 )

		self.m_treeCtrl1 = wx.TreeCtrl( self.m_scrolledWindow5, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TR_DEFAULT_STYLE )
		gSizer6.Add( self.m_treeCtrl1, 0, wx.ALL, 5 )

		self.m_grid1 = wx.grid.Grid( self.m_scrolledWindow5, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )

		# Grid
		self.m_grid1.CreateGrid( 5, 5 )
		self.m_grid1.EnableEditing( True )
		self.m_grid1.EnableGridLines( True )
		self.m_grid1.EnableDragGridSize( False )
		self.m_grid1.SetMargins( 0, 0 )

		# Columns
		self.m_grid1.EnableDragColMove( False )
		self.m_grid1.EnableDragColSize( True )
		self.m_grid1.SetColLabelSize( 30 )
		self.m_grid1.SetColLabelAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )

		# Rows
		self.m_grid1.EnableDragRowSize( True )
		self.m_grid1.SetRowLabelSize( 80 )
		self.m_grid1.SetRowLabelAlignment( wx.ALIGN_CENTER, wx.ALIGN_CENTER )

		# Label Appearance

		# Cell Defaults
		self.m_grid1.SetDefaultCellAlignment( wx.ALIGN_LEFT, wx.ALIGN_TOP )
		gSizer6.Add( self.m_grid1, 0, wx.ALL, 5 )

		m_checkList2Choices = [u"aaa", u"bbb", u"ccc"]
		self.m_checkList2 = wx.CheckListBox( self.m_scrolledWindow5, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_checkList2Choices, 0 )
		gSizer6.Add( self.m_checkList2, 0, wx.ALL, 5 )


		self.m_scrolledWindow5.SetSizer( gSizer6 )
		self.m_scrolledWindow5.Layout()
		gSizer6.Fit( self.m_scrolledWindow5 )
		self.m_listbook1.AddPage( self.m_scrolledWindow5, u"a page", True )

		bSizer2.Add( self.m_listbook1, 1, wx.EXPAND |wx.ALL, 5 )

		self.m_choicebook1 = wx.Choicebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.CHB_DEFAULT )
		self.m_panel8 = wx.Panel( self.m_choicebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.m_choicebook1.AddPage( self.m_panel8, u"a page", True )
		self.m_panel9 = wx.Panel( self.m_choicebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.m_choicebook1.AddPage( self.m_panel9, u"a page", False )
		self.m_panel10 = wx.Panel( self.m_choicebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.m_choicebook1.AddPage( self.m_panel10, u"a page", False )
		bSizer2.Add( self.m_choicebook1, 1, wx.EXPAND |wx.ALL, 5 )


		self.SetSizer( bSizer2 )
		self.Layout()
		self.m_timer1 = wx.Timer()
		self.m_timer1.SetOwner( self, wx.ID_ANY )

		self.Centre( wx.BOTH )
Example #14
0
    def __init__(self, parent):
        wx.Panel.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          pos=wx.DefaultPosition,
                          size=wx.Size(507, 397),
                          style=wx.TAB_TRAVERSAL)

        bSizer6 = wx.BoxSizer(wx.VERTICAL)

        sbSizer1 = wx.StaticBoxSizer(
            wx.StaticBox(self, wx.ID_ANY, u"EXPANDIR / EXPAND"), wx.HORIZONTAL)

        self.m_button_designer = wx.BitmapButton(
            self, wx.ID_ANY,
            wx.Bitmap(u"recursos/images/designer_vipera.png",
                      wx.BITMAP_TYPE_ANY), wx.DefaultPosition, wx.DefaultSize,
            wx.BU_AUTODRAW)
        self.m_button_designer.SetToolTipString(u"Diseñador de clases")

        self.m_button_designer.SetToolTipString(u"Diseñador de clases")

        sbSizer1.Add(self.m_button_designer, 0, wx.ALL, 0)

        self.m_button_editor = wx.BitmapButton(
            self, wx.ID_ANY,
            wx.Bitmap(u"recursos/images/editor_vipera.png",
                      wx.BITMAP_TYPE_ANY), wx.DefaultPosition, wx.DefaultSize,
            wx.BU_AUTODRAW)
        self.m_button_editor.SetToolTipString(u"Editor Python")

        self.m_button_editor.SetToolTipString(u"Editor Python")

        sbSizer1.Add(self.m_button_editor, 0, wx.ALL, 0)

        bSizer6.Add(sbSizer1, 0, wx.EXPAND, 5)

        self.m_splitter_principal = wx.SplitterWindow(
            self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize,
            wx.SP_3D | wx.SP_LIVE_UPDATE)
        self.m_splitter_principal.Bind(wx.EVT_IDLE,
                                       self.m_splitter_principalOnIdle)
        self.m_splitter_principal.SetMinimumPaneSize(10)

        self.m_panel_designer = wx.Panel(self.m_splitter_principal, wx.ID_ANY,
                                         wx.DefaultPosition, wx.DefaultSize,
                                         wx.TAB_TRAVERSAL)
        bSizer7 = wx.BoxSizer(wx.VERTICAL)

        self.m_choicebook = wx.Choicebook(self.m_panel_designer, wx.ID_ANY,
                                          wx.DefaultPosition, wx.DefaultSize,
                                          wx.CHB_DEFAULT)
        self.m_panel_clases = wx.Panel(self.m_choicebook, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       wx.TAB_TRAVERSAL)
        self.m_choicebook.AddPage(self.m_panel_clases, u"Diagrama de clases",
                                  False)
        self.m_panel_funciones = wx.Panel(self.m_choicebook, wx.ID_ANY,
                                          wx.DefaultPosition, wx.DefaultSize,
                                          wx.TAB_TRAVERSAL)
        bSizer4 = wx.BoxSizer(wx.VERTICAL)

        self.m_listCtrl_funciones = wx.ListCtrl(
            self.m_panel_funciones, wx.ID_ANY, wx.DefaultPosition,
            wx.DefaultSize, wx.LC_HRULES | wx.LC_REPORT | wx.LC_SINGLE_SEL
            | wx.LC_SORT_ASCENDING)
        bSizer4.Add(self.m_listCtrl_funciones, 1, wx.ALL | wx.EXPAND, 5)

        self.m_panel_funciones.SetSizer(bSizer4)
        self.m_panel_funciones.Layout()
        bSizer4.Fit(self.m_panel_funciones)
        self.m_choicebook.AddPage(self.m_panel_funciones, u"Funciones", False)
        bSizer7.Add(self.m_choicebook, 1, wx.EXPAND | wx.ALL, 5)

        self.m_panel_designer.SetSizer(bSizer7)
        self.m_panel_designer.Layout()
        bSizer7.Fit(self.m_panel_designer)
        self.m_panel_editor = wx.Panel(self.m_splitter_principal, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       wx.TAB_TRAVERSAL)
        self.m_splitter_principal.SplitVertically(self.m_panel_designer,
                                                  self.m_panel_editor, 10000)
        bSizer6.Add(self.m_splitter_principal, 1, wx.EXPAND, 5)

        sbSizer2 = wx.StaticBoxSizer(
            wx.StaticBox(self, wx.ID_ANY, u"Fichero actual / Current file"),
            wx.HORIZONTAL)

        self.m_textCtrl_nombre_fichero = wx.TextCtrl(self, wx.ID_ANY,
                                                     wx.EmptyString,
                                                     wx.DefaultPosition,
                                                     wx.Size(200, -1),
                                                     wx.TE_READONLY)
        self.m_textCtrl_nombre_fichero.SetFont(
            wx.Font(wx.NORMAL_FONT.GetPointSize(), 70, 94, 92, False,
                    wx.EmptyString))
        self.m_textCtrl_nombre_fichero.SetForegroundColour(wx.Colour(
            0, 0, 255))

        sbSizer2.Add(self.m_textCtrl_nombre_fichero, 0, wx.ALL, 5)

        self.m_textCtrl_fichero = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString,
                                              wx.DefaultPosition,
                                              wx.DefaultSize, wx.TE_READONLY)
        self.m_textCtrl_fichero.SetFont(
            wx.Font(wx.NORMAL_FONT.GetPointSize(), 70, 94, 92, False,
                    wx.EmptyString))
        self.m_textCtrl_fichero.SetForegroundColour(wx.Colour(255, 255, 255))
        self.m_textCtrl_fichero.SetBackgroundColour(wx.Colour(0, 0, 255))

        sbSizer2.Add(self.m_textCtrl_fichero, 1, wx.ALL | wx.EXPAND, 5)

        bSizer6.Add(sbSizer2, 0, wx.ALL | wx.EXPAND, 5)

        self.SetSizer(bSizer6)
        self.Layout()

        # Connect Events
        self.m_button_designer.Bind(wx.EVT_BUTTON, self.OnDesigner)
        self.m_button_editor.Bind(wx.EVT_BUTTON, self.OnEditor)
Example #15
0
 def test_choicebk3(self):
     book = wx.Choicebook(self.frame)
     book.AddPage(wx.Panel(book), 'one')
     book.AddPage(wx.Panel(book), 'two')
Example #16
0
 def test_choicebk2(self):
     book = wx.Choicebook()
     book.Create(self.frame)
Example #17
0
    def __init__(self, RunForm, parent ):
        wx.Notebook.__init__(self, parent, style=wx.BK_DEFAULT, size=(500, 50) )

        # Create panels and pages for each of the three notebook tabs.
        parameterGridPanel = wx.Panel(self, -1)
        settingsPanel = wx.Panel(self, -1)
        executionPanel = wx.Panel(self, -1)

        self.AddPage(parameterGridPanel, "Parameter Grid")
        self.AddPage(settingsPanel, "Run Configuration")
        self.AddPage(executionPanel, "Resources and Execution")

        # ***** PARAMETER GRID TAB *****
        parameterGridSizer = wx.BoxSizer( wx.HORIZONTAL )
        RunForm.speciesGrid = ParameterGrid( parameterGridPanel, RunForm.run )
        parameterGridSizer.Add( RunForm.speciesGrid, 1, wx.EXPAND )
        parameterGridPanel.SetSizerAndFit( parameterGridSizer )

        # Create the parameter grid control.
        RunForm.speciesGrid.CreateGrid( RunForm.run.species.numRows, RunForm.run.species.numColumns )
        RunForm.speciesGrid.SetColLabelValue( 0, "Parameter" )
        RunForm.speciesGrid.SetColLabelValue( 1, "Type")
        RunForm.speciesGrid.SetColLabelValue( 2, "Value(s)")
        RunForm.speciesGrid.SetColLabelValue( 3, "Directory Order")
        RunForm.speciesGrid.SetColSize( 3, 100 )

        # ***** RUN SETTINGS TAB *****
        runSettingsSizer = wx.BoxSizer( wx.VERTICAL )
        RunForm.runPropertiesGrid = wx_propgrid.PropertyGrid( settingsPanel, size=(300, 300) )
        runSettingsSizer.Add( RunForm.runPropertiesGrid, 2, wx.EXPAND )
        settingsPanel.SetSizerAndFit( runSettingsSizer )

        RunForm.runPropertiesGrid.Append( wx_propgrid.PropertyCategory( "Basic Script Properties" ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.StringProperty( "Script filename", "scriptFilename", RunForm.run.runSettings.scriptFilename ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.DirProperty( "Script output location", "scriptLocation", RunForm.run.runSettings.scriptLocation ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.LongStringProperty( "Run notes", "runNotes", RunForm.run.runNotes ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.PropertyCategory( "Executable Properties" ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.FileProperty( "Executable filename", "executableFilename", RunForm.run.runSettings.executableFilename ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.FileProperty( "Output filename", "outputFilename", RunForm.run.runSettings.outputFilename ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.FileProperty( "Input filename", "inputFilename", RunForm.run.runSettings.inputFilename ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.DirProperty( "Source path", "sourcePath", RunForm.run.runSettings.sourcePath ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.PropertyCategory( "Basic Script Tasks" ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.BoolProperty("Compile executable from source", "optionCompileSource", RunForm.run.runSettings.optionCompileSource ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.BoolProperty("Build directory structure", "optionBuildDirectoryStructure", RunForm.run.runSettings.optionBuildDirectoryStructure ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.BoolProperty("Disable input redirection", "optionDisableInputRedirection", RunForm.run.runSettings.optionDisableInputRedirection ) )
        RunForm.runPropertiesGrid.Append( wx_propgrid.BoolProperty("Generate status check script", "optionGenerateCheckStatusScript", RunForm.run.runSettings.optionGenerateCheckStatusScript ) )

        # ***** RESOURCES AND EXECUTION PANEL *****
        executionSettingsSizer = wx.BoxSizer( wx.VERTICAL )
        RunForm.singleMachinePropertyGrid = wx_propgrid.PropertyGrid( executionPanel )
        RunForm.executionChoiceBook = wx.Choicebook( executionPanel, id=wx.ID_ANY )
        executionSettingsSizer.Add( RunForm.executionChoiceBook, 1, wx.EXPAND )
        executionPanel.SetSizerAndFit( executionSettingsSizer )

        panelSingleMachine = wx.Panel( RunForm.executionChoiceBook )
        panelPBS = wx.Panel( RunForm.executionChoiceBook )
        panelSingleMachineMPI = wx.Panel( RunForm.executionChoiceBook )
        panelPBSMPI = wx.Panel( RunForm.executionChoiceBook )

        RunForm.executionChoiceBook.AddPage( panelSingleMachine, "Single Machine or Interactive Job (Recovery Enabled)")
        RunForm.executionChoiceBook.AddPage( panelPBS, "PBS Scheduler on Cluster")
        #RunForm.executionChoiceBook.AddPage( panelSingleMachineMPI, "Single Machine or Interactive Job using MPI")
        #RunForm.executionChoiceBook.AddPage( panelPBSMPI, "PBS Scheduler on Cluster using MPI")

        # SINGLE MACHINE SETTINGS
        RunForm.propertyGridSingleMachine = wx_propgrid.PropertyGrid( panelSingleMachine )
        sizerGridSingleMachine = wx.BoxSizer( wx.VERTICAL )
        sizerGridSingleMachine.Add( RunForm.propertyGridSingleMachine, 1, wx.EXPAND )
        panelSingleMachine.SetSizerAndFit( sizerGridSingleMachine )
        RunForm.propertyGridSingleMachine.Append( wx_propgrid.PropertyCategory( "Resources" ) )
        RunForm.propertyGridSingleMachine.Append( wx_propgrid.IntProperty( "Number of simultaneous runs", "numSimRuns", RunForm.run.availableModules.SingleMachineResourceManager.numSimRuns ) )
        RunForm.propertyGridSingleMachine.Append( wx_propgrid.IntProperty( "Process status check delay (seconds)", "procCheckWaitTime", RunForm.run.availableModules.SingleMachineResourceManager.procCheckWaitTime ) )
        RunForm.propertyGridSingleMachine.Append( wx_propgrid.PropertyCategory( "Additional Commands" ) )
        RunForm.propertyGridSingleMachine.Append( wx_propgrid.LongStringProperty( "Additional pre-execution commands", "additionalPreExecutionCommands", RunForm.run.availableModules.SingleMachineResourceManager.additionalPreExecutionCommands ) )
        RunForm.propertyGridSingleMachine.Append( wx_propgrid.LongStringProperty( "Additional post-execution commands", "additionalPostExecutionCommands", RunForm.run.availableModules.SingleMachineResourceManager.additionalPostExecutionCommands ) )

        # PBS SETTINGS
        RunForm.propertyGridPBS = wx_propgrid.PropertyGrid( panelPBS )
        sizerGridPBS = wx.BoxSizer( wx.VERTICAL )
        sizerGridPBS.Add( RunForm.propertyGridPBS, 1, wx.EXPAND )
        panelPBS.SetSizerAndFit( sizerGridPBS )
        RunForm.propertyGridPBS.Append( wx_propgrid.PropertyCategory( "PBS Settings" ) )
        RunForm.propertyGridPBS.Append( wx_propgrid.IntProperty( "Number of nodes", "numNodes", RunForm.run.availableModules.PBSResourceManager.numNodes ) )
        RunForm.propertyGridPBS.Append( wx_propgrid.IntProperty( "Processors per node (ppn)", "processorsPerNode", RunForm.run.availableModules.PBSResourceManager.processorsPerNode ) )
        RunForm.propertyGridPBS.Append( wx_propgrid.StringProperty( "Walltime", "walltime", RunForm.run.availableModules.PBSResourceManager.walltime ) )
        RunForm.propertyGridPBS.Append( wx_propgrid.PropertyCategory( "Additional Commands" ) )
        RunForm.propertyGridPBS.Append( wx_propgrid.LongStringProperty( "Additional pre-execution commands", "additionalPreExecutionCommands", RunForm.run.availableModules.PBSResourceManager.additionalPreExecutionCommands ) )
        RunForm.propertyGridPBS.Append( wx_propgrid.LongStringProperty( "Additional post-execution commands", "additionalPostExecutionCommands", RunForm.run.availableModules.PBSResourceManager.additionalPostExecutionCommands ) )
Example #18
0
	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"库存管理系统", pos = wx.DefaultPosition, size = wx.Size( 819,479 ), style = wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE|wx.TAB_TRAVERSAL )
		
		self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
		
		self.m_menubar1 = wx.MenuBar( 0 )
		self.m_menu2 = wx.Menu()
		self.m_menuItem1 = wx.MenuItem( self.m_menu2, wx.ID_ANY, u"退出", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu2.AppendItem( self.m_menuItem1 )
		
		self.m_menubar1.Append( self.m_menu2, u"文件" ) 
		
		self.m_menu5 = wx.Menu()
		self.m_menuItem3 = wx.MenuItem( self.m_menu5, wx.ID_ANY, u"管理产品型号", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu5.AppendItem( self.m_menuItem3 )
		
		self.m_menuItem4 = wx.MenuItem( self.m_menu5, wx.ID_ANY, u"管理买家数据", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu5.AppendItem( self.m_menuItem4 )
		
		self.m_menubar1.Append( self.m_menu5, u"管理" ) 
		
		self.m_menu3 = wx.Menu()
		self.m_menuItem2 = wx.MenuItem( self.m_menu3, wx.ID_ANY, u"关于", wx.EmptyString, wx.ITEM_NORMAL )
		self.m_menu3.AppendItem( self.m_menuItem2 )
		
		self.m_menubar1.Append( self.m_menu3, u"帮助" ) 
		
		self.SetMenuBar( self.m_menubar1 )
		
		bSizer1 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.m_splitter1 = wx.SplitterWindow( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.SP_3D|wx.SP_3DBORDER|wx.SP_3DSASH )
		self.m_splitter1.Bind( wx.EVT_IDLE, self.m_splitter1OnIdle )
		
		self.m_panel2 = wx.Panel( self.m_splitter1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer4 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText1 = wx.StaticText( self.m_panel2, wx.ID_ANY, u"查询", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText1.Wrap( -1 )
		self.m_staticText1.SetFont( wx.Font( 9, 74, 90, 92, False, wx.EmptyString ) )
		self.m_staticText1.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_ACTIVECAPTION ) )
		
		bSizer4.Add( self.m_staticText1, 0, wx.ALL|wx.EXPAND, 0 )
		
		self.m_listbook2 = wx.Listbook( self.m_panel2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LB_DEFAULT )
		self.m_panel20 = wx.Panel( self.m_listbook2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer27 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText49 = wx.StaticText( self.m_panel20, wx.ID_ANY, u"说明:查询一段时间内的销售总额明细", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText49.Wrap( -1 )
		self.m_staticText49.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHT ) )
		
		bSizer27.Add( self.m_staticText49, 0, wx.ALL, 5 )
		
		sbSizer1 = wx.StaticBoxSizer( wx.StaticBox( self.m_panel20, wx.ID_ANY, u"时间条件" ), wx.VERTICAL )
		
		fgSizer1 = wx.FlexGridSizer( 0, 2, 0, 0 )
		fgSizer1.SetFlexibleDirection( wx.BOTH )
		fgSizer1.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText3 = wx.StaticText( self.m_panel20, wx.ID_ANY, u"开始:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText3.Wrap( -1 )
		fgSizer1.Add( self.m_staticText3, 0, wx.ALL, 5 )
		
		self.m_datePicker1 = wx.DatePickerCtrl( self.m_panel20, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.DP_DEFAULT|wx.DP_DROPDOWN )
		fgSizer1.Add( self.m_datePicker1, 0, wx.ALL, 5 )
		
		self.m_staticText4 = wx.StaticText( self.m_panel20, wx.ID_ANY, u"结束:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText4.Wrap( -1 )
		fgSizer1.Add( self.m_staticText4, 0, wx.ALL, 5 )
		
		self.m_datePicker2 = wx.DatePickerCtrl( self.m_panel20, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.DP_DEFAULT|wx.DP_DROPDOWN )
		fgSizer1.Add( self.m_datePicker2, 0, wx.ALL, 5 )
		
		
		sbSizer1.Add( fgSizer1, 1, wx.EXPAND, 5 )
		
		
		bSizer27.Add( sbSizer1, 0, wx.EXPAND, 5 )
		
		self.m_button2 = wx.Button( self.m_panel20, wx.ID_ANY, u"查询", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer27.Add( self.m_button2, 0, wx.ALIGN_CENTER|wx.ALL, 5 )
		
		
		self.m_panel20.SetSizer( bSizer27 )
		self.m_panel20.Layout()
		bSizer27.Fit( self.m_panel20 )
		self.m_listbook2.AddPage( self.m_panel20, u"销售总额查询", True )
		self.m_panel21 = wx.Panel( self.m_listbook2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer28 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText50 = wx.StaticText( self.m_panel21, wx.ID_ANY, u"说明:查询某产品的销售明细", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText50.Wrap( -1 )
		self.m_staticText50.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHT ) )
		
		bSizer28.Add( self.m_staticText50, 0, wx.ALL, 5 )
		
		self.m_button21 = wx.Button( self.m_panel21, wx.ID_ANY, u"查询", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer28.Add( self.m_button21, 0, wx.ALL, 5 )
		
		sbSizer11 = wx.StaticBoxSizer( wx.StaticBox( self.m_panel21, wx.ID_ANY, u"时间条件" ), wx.VERTICAL )
		
		fgSizer11 = wx.FlexGridSizer( 0, 2, 0, 0 )
		fgSizer11.SetFlexibleDirection( wx.BOTH )
		fgSizer11.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText31 = wx.StaticText( self.m_panel21, wx.ID_ANY, u"开始:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText31.Wrap( -1 )
		fgSizer11.Add( self.m_staticText31, 0, wx.ALL, 5 )
		
		self.m_datePicker11 = wx.DatePickerCtrl( self.m_panel21, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.DP_DEFAULT|wx.DP_DROPDOWN )
		fgSizer11.Add( self.m_datePicker11, 0, wx.ALL, 5 )
		
		self.m_staticText41 = wx.StaticText( self.m_panel21, wx.ID_ANY, u"结束:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText41.Wrap( -1 )
		fgSizer11.Add( self.m_staticText41, 0, wx.ALL, 5 )
		
		self.m_datePicker21 = wx.DatePickerCtrl( self.m_panel21, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.DP_DEFAULT|wx.DP_DROPDOWN )
		fgSizer11.Add( self.m_datePicker21, 0, wx.ALL, 5 )
		
		
		sbSizer11.Add( fgSizer11, 1, wx.EXPAND, 5 )
		
		
		bSizer28.Add( sbSizer11, 0, wx.EXPAND, 5 )
		
		self.m_choicebook2 = wx.Choicebook( self.m_panel21, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.CHB_DEFAULT )
		self.m_panel24 = wx.Panel( self.m_choicebook2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer30 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer33 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.m_checkBox5 = wx.CheckBox( self.m_panel24, wx.ID_ANY, u"全部选中", wx.DefaultPosition, wx.DefaultSize, wx.CHK_2STATE )
		bSizer33.Add( self.m_checkBox5, 0, wx.ALL, 5 )
		
		
		bSizer30.Add( bSizer33, 0, wx.EXPAND, 5 )
		
		self.m_scrolledWindow2 = wx.ScrolledWindow( self.m_panel24, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.m_scrolledWindow2.SetScrollRate( 5, 5 )
		fgSizer7 = wx.FlexGridSizer( 0, 1, 0, 0 )
		fgSizer7.SetFlexibleDirection( wx.BOTH )
		fgSizer7.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		
		self.m_scrolledWindow2.SetSizer( fgSizer7 )
		self.m_scrolledWindow2.Layout()
		fgSizer7.Fit( self.m_scrolledWindow2 )
		bSizer30.Add( self.m_scrolledWindow2, 1, wx.ALL|wx.EXPAND, 5 )
		
		
		self.m_panel24.SetSizer( bSizer30 )
		self.m_panel24.Layout()
		bSizer30.Fit( self.m_panel24 )
		self.m_choicebook2.AddPage( self.m_panel24, u"白膜", False )
		self.m_panel25 = wx.Panel( self.m_choicebook2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer301 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer331 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.m_checkBox51 = wx.CheckBox( self.m_panel25, wx.ID_ANY, u"全部选中", wx.DefaultPosition, wx.DefaultSize, wx.CHK_2STATE )
		bSizer331.Add( self.m_checkBox51, 0, wx.ALL, 5 )
		
		
		bSizer301.Add( bSizer331, 0, wx.EXPAND, 5 )
		
		self.m_scrolledWindow21 = wx.ScrolledWindow( self.m_panel25, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.m_scrolledWindow21.SetScrollRate( 5, 5 )
		fgSizer71 = wx.FlexGridSizer( 0, 1, 0, 0 )
		fgSizer71.SetFlexibleDirection( wx.BOTH )
		fgSizer71.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		
		self.m_scrolledWindow21.SetSizer( fgSizer71 )
		self.m_scrolledWindow21.Layout()
		fgSizer71.Fit( self.m_scrolledWindow21 )
		bSizer301.Add( self.m_scrolledWindow21, 1, wx.ALL|wx.EXPAND, 5 )
		
		
		self.m_panel25.SetSizer( bSizer301 )
		self.m_panel25.Layout()
		bSizer301.Fit( self.m_panel25 )
		self.m_choicebook2.AddPage( self.m_panel25, u"蜂窝纸", False )
		self.m_panel26 = wx.Panel( self.m_choicebook2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer302 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer332 = wx.BoxSizer( wx.HORIZONTAL )
		
		self.m_checkBox52 = wx.CheckBox( self.m_panel26, wx.ID_ANY, u"全部选中", wx.DefaultPosition, wx.DefaultSize, wx.CHK_2STATE )
		bSizer332.Add( self.m_checkBox52, 0, wx.ALL, 5 )
		
		
		bSizer302.Add( bSizer332, 0, wx.EXPAND, 5 )
		
		self.m_scrolledWindow22 = wx.ScrolledWindow( self.m_panel26, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.m_scrolledWindow22.SetScrollRate( 5, 5 )
		fgSizer72 = wx.FlexGridSizer( 0, 1, 0, 0 )
		fgSizer72.SetFlexibleDirection( wx.BOTH )
		fgSizer72.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		
		self.m_scrolledWindow22.SetSizer( fgSizer72 )
		self.m_scrolledWindow22.Layout()
		fgSizer72.Fit( self.m_scrolledWindow22 )
		bSizer302.Add( self.m_scrolledWindow22, 1, wx.ALL|wx.EXPAND, 5 )
		
		
		self.m_panel26.SetSizer( bSizer302 )
		self.m_panel26.Layout()
		bSizer302.Fit( self.m_panel26 )
		self.m_choicebook2.AddPage( self.m_panel26, u"木板", False )
		bSizer28.Add( self.m_choicebook2, 1, wx.EXPAND |wx.ALL, 5 )
		
		
		self.m_panel21.SetSizer( bSizer28 )
		self.m_panel21.Layout()
		bSizer28.Fit( self.m_panel21 )
		self.m_listbook2.AddPage( self.m_panel21, u"产品相关查询", False )
		self.m_panel22 = wx.Panel( self.m_listbook2, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer29 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText51 = wx.StaticText( self.m_panel22, wx.ID_ANY, u"说明:查询与某买家的交易明细", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText51.Wrap( 0 )
		self.m_staticText51.SetForegroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHT ) )
		
		bSizer29.Add( self.m_staticText51, 0, wx.ALL, 5 )
		
		fgSizer6 = wx.FlexGridSizer( 0, 1, 0, 0 )
		fgSizer6.SetFlexibleDirection( wx.BOTH )
		fgSizer6.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		
		bSizer29.Add( fgSizer6, 0, wx.EXPAND, 5 )
		
		self.m_button22 = wx.Button( self.m_panel22, wx.ID_ANY, u"查询", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer29.Add( self.m_button22, 0, wx.ALL, 5 )
		
		sbSizer111 = wx.StaticBoxSizer( wx.StaticBox( self.m_panel22, wx.ID_ANY, u"时间条件" ), wx.VERTICAL )
		
		fgSizer111 = wx.FlexGridSizer( 0, 2, 0, 0 )
		fgSizer111.SetFlexibleDirection( wx.BOTH )
		fgSizer111.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		self.m_staticText311 = wx.StaticText( self.m_panel22, wx.ID_ANY, u"开始:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText311.Wrap( -1 )
		fgSizer111.Add( self.m_staticText311, 0, wx.ALL, 5 )
		
		self.m_datePicker111 = wx.DatePickerCtrl( self.m_panel22, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.DP_DEFAULT|wx.DP_DROPDOWN )
		fgSizer111.Add( self.m_datePicker111, 0, wx.ALL, 5 )
		
		self.m_staticText411 = wx.StaticText( self.m_panel22, wx.ID_ANY, u"结束:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText411.Wrap( -1 )
		fgSizer111.Add( self.m_staticText411, 0, wx.ALL, 5 )
		
		self.m_datePicker211 = wx.DatePickerCtrl( self.m_panel22, wx.ID_ANY, wx.DefaultDateTime, wx.DefaultPosition, wx.DefaultSize, wx.DP_DEFAULT|wx.DP_DROPDOWN )
		fgSizer111.Add( self.m_datePicker211, 0, wx.ALL, 5 )
		
		
		sbSizer111.Add( fgSizer111, 1, wx.EXPAND, 5 )
		
		
		bSizer29.Add( sbSizer111, 0, wx.EXPAND, 5 )
		
		bSizer303 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_scrolledWindow23 = wx.ScrolledWindow( self.m_panel22, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.HSCROLL|wx.VSCROLL )
		self.m_scrolledWindow23.SetScrollRate( 5, 5 )
		fgSizer73 = wx.FlexGridSizer( 0, 1, 0, 0 )
		fgSizer73.SetFlexibleDirection( wx.BOTH )
		fgSizer73.SetNonFlexibleGrowMode( wx.FLEX_GROWMODE_SPECIFIED )
		
		m_radioBox1Choices = [ u"买家1" ]
		self.m_radioBox1 = wx.RadioBox( self.m_scrolledWindow23, wx.ID_ANY, u"买家", wx.DefaultPosition, wx.DefaultSize, m_radioBox1Choices, 100, wx.RA_SPECIFY_ROWS )
		self.m_radioBox1.SetSelection( 0 )
		fgSizer73.Add( self.m_radioBox1, 1, wx.ALL|wx.EXPAND, 5 )
		
		
		self.m_scrolledWindow23.SetSizer( fgSizer73 )
		self.m_scrolledWindow23.Layout()
		fgSizer73.Fit( self.m_scrolledWindow23 )
		bSizer303.Add( self.m_scrolledWindow23, 1, wx.ALL|wx.EXPAND, 5 )
		
		
		bSizer29.Add( bSizer303, 1, wx.EXPAND, 5 )
		
		
		self.m_panel22.SetSizer( bSizer29 )
		self.m_panel22.Layout()
		bSizer29.Fit( self.m_panel22 )
		self.m_listbook2.AddPage( self.m_panel22, u"买家相关查询", False )
		
		bSizer4.Add( self.m_listbook2, 1, wx.ALL|wx.EXPAND, 5 )
		
		
		self.m_panel2.SetSizer( bSizer4 )
		self.m_panel2.Layout()
		bSizer4.Fit( self.m_panel2 )
		self.m_panel3 = wx.Panel( self.m_splitter1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.m_panel3.SetFont( wx.Font( 9, 74, 90, 92, False, wx.EmptyString ) )
		
		bSizer3 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_auinotebook1 = wx.aui.AuiNotebook( self.m_panel3, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.aui.AUI_NB_CLOSE_ON_ALL_TABS|wx.aui.AUI_NB_DEFAULT_STYLE )
		self.m_panel5 = wx.Panel( self.m_auinotebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer41 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_grid1 = wx.grid.Grid( self.m_panel5, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
		
		# Grid
		self.m_grid1.CreateGrid( 0, 0 )
		self.m_grid1.EnableEditing( False )
		self.m_grid1.EnableGridLines( True )
		self.m_grid1.SetGridLineColour( wx.Colour( 128, 128, 0 ) )
		self.m_grid1.EnableDragGridSize( False )
		self.m_grid1.SetMargins( 0, 0 )
		
		# Columns
		self.m_grid1.EnableDragColMove( False )
		self.m_grid1.EnableDragColSize( True )
		self.m_grid1.SetColLabelSize( 30 )
		self.m_grid1.SetColLabelAlignment( wx.ALIGN_CENTRE, wx.ALIGN_CENTRE )
		
		# Rows
		self.m_grid1.AutoSizeRows()
		self.m_grid1.EnableDragRowSize( True )
		self.m_grid1.SetRowLabelSize( 40 )
		self.m_grid1.SetRowLabelAlignment( wx.ALIGN_CENTRE, wx.ALIGN_CENTRE )
		
		# Label Appearance
		
		# Cell Defaults
		self.m_grid1.SetDefaultCellAlignment( wx.ALIGN_LEFT, wx.ALIGN_TOP )
		bSizer41.Add( self.m_grid1, 1, wx.ALL|wx.EXPAND, 0 )
		
		
		self.m_panel5.SetSizer( bSizer41 )
		self.m_panel5.Layout()
		bSizer41.Fit( self.m_panel5 )
		self.m_auinotebook1.AddPage( self.m_panel5, u"数据", False, wx.NullBitmap )
		self.m_panel6 = wx.Panel( self.m_auinotebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		self.m_auinotebook1.AddPage( self.m_panel6, u"报表", False, wx.NullBitmap )
		
		bSizer3.Add( self.m_auinotebook1, 1, wx.EXPAND |wx.ALL, 0 )
		
		
		self.m_panel3.SetSizer( bSizer3 )
		self.m_panel3.Layout()
		bSizer3.Fit( self.m_panel3 )
		self.m_splitter1.SplitVertically( self.m_panel2, self.m_panel3, 332 )
		bSizer1.Add( self.m_splitter1, 1, wx.EXPAND, 5 )
		
		
		self.SetSizer( bSizer1 )
		self.Layout()
		self.m_statusBar1 = self.CreateStatusBar( 1, wx.ST_SIZEGRIP, wx.ID_ANY )
		
		self.Centre( wx.BOTH )
		
		# Connect Events
		self.Bind( wx.EVT_MENU, self.OnExit, id = self.m_menuItem1.GetId() )
		self.Bind( wx.EVT_MENU, self.OnAddProductBaseInfo, id = self.m_menuItem3.GetId() )
		self.Bind( wx.EVT_MENU, self.OnManagerBuyers, id = self.m_menuItem4.GetId() )
		self.Bind( wx.EVT_MENU, self.OnAbout, id = self.m_menuItem2.GetId() )
		self.m_button2.Bind( wx.EVT_BUTTON, self.OnSearch )
		self.m_button21.Bind( wx.EVT_BUTTON, self.OnSearch )
		self.m_choicebook2.Bind( wx.EVT_CHOICEBOOK_PAGE_CHANGED, self.OnChoiceCategoryChanged )
		self.m_checkBox5.Bind( wx.EVT_CHECKBOX, self.OnCheckBoxSelectAllProductTypes )
		self.m_checkBox51.Bind( wx.EVT_CHECKBOX, self.OnCheckBoxSelectAllProductTypes )
		self.m_checkBox52.Bind( wx.EVT_CHECKBOX, self.OnCheckBoxSelectAllProductTypes )
		self.m_button22.Bind( wx.EVT_BUTTON, self.OnSearch )
		self.m_auinotebook1.Bind( wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE, self.OnNoteBookClose )
		self.m_grid1.Bind( wx.grid.EVT_GRID_CELL_RIGHT_CLICK, self.OnCellRightClick )
		self.m_grid1.Bind( wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.OnGridLabelLeftClick )
Example #19
0
    def __init__(self, *args, **kwds):
        editorpanel.EditorPanel.__init__(self, *args, **kwds)
        self.entity = None
        self.getting_values = False

        self.choicebook_shape = wx.Choicebook(self, -1)
        self.panel_rectangle = wx.Panel(self.choicebook_shape, -1)
        self.sizer_shape_staticbox = wx.StaticBox(self, -1, "Shape")
        self.panel_circle = wx.Panel(self.choicebook_shape, -1)
        self.label_radius = wx.StaticText(self.panel_circle,
                                          -1,
                                          "Radius",
                                          style=wx.TE_RIGHT)
        self.float_radius = floatctrl.FloatCtrl(self.panel_circle,
                                                limited=True,
                                                value=5.0,
                                                min=1.0,
                                                max=10000.0,
                                                size=wx.Size(60, -1),
                                                style=wx.TE_RIGHT)
        self.label_circle_height = wx.StaticText(self.panel_circle,
                                                 -1,
                                                 "Height",
                                                 style=wx.TE_RIGHT)
        self.float_circle_height = floatctrl.FloatCtrl(self.panel_circle,
                                                       limited=True,
                                                       value=0.0,
                                                       min=0.0,
                                                       max=10000.0,
                                                       size=wx.Size(60, -1),
                                                       style=wx.TE_RIGHT)
        self.label_length = wx.StaticText(self.panel_rectangle,
                                          -1,
                                          "Length",
                                          style=wx.TE_RIGHT)
        self.float_length = floatctrl.FloatCtrl(self.panel_rectangle,
                                                limited=True,
                                                value=5.0,
                                                min=1.0,
                                                max=10000.0,
                                                size=wx.Size(60, -1),
                                                style=wx.TE_RIGHT)
        self.label_width = wx.StaticText(self.panel_rectangle,
                                         -1,
                                         "Width",
                                         style=wx.TE_RIGHT)
        self.float_width = floatctrl.FloatCtrl(self.panel_rectangle,
                                               limited=True,
                                               value=5.0,
                                               min=1.0,
                                               max=10000.0,
                                               size=wx.Size(60, -1),
                                               style=wx.TE_RIGHT)
        self.label_polygon_height = wx.StaticText(self.panel_rectangle,
                                                  -1,
                                                  "Height",
                                                  style=wx.TE_RIGHT)
        self.float_polygon_height = floatctrl.FloatCtrl(self.panel_rectangle,
                                                        limited=True,
                                                        value=0.0,
                                                        min=0.0,
                                                        max=10000.0,
                                                        size=wx.Size(60, -1),
                                                        style=wx.TE_RIGHT)
        self.text_info = wx.lib.ticker.Ticker(self, -1,
            "Set a 0 height for an infinite height. " \
            "Polygon length and width may not display the real size, " \
            "use them only to make the polygon a rectangle.",
            bgcolor=wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE),
            ppf=1, fps=50)
        self.input = triggerinput.TriggerInputCtrl(self, 'Perceivable events')

        self.__set_properties()
        self.__do_layout()
        self.__bind_events()
Example #20
0
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=wx.EmptyString,
                          pos=wx.DefaultPosition,
                          size=wx.Size(577, 391),
                          style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHints(wx.DefaultSize, wx.DefaultSize)

        self.m_menubar_mainform = wx.MenuBar(0)
        self.m_menu_file = wx.Menu()
        self.m_menuItem_file_new = wx.MenuItem(self.m_menu_file, wx.ID_ANY,
                                               u"New", wx.EmptyString,
                                               wx.ITEM_NORMAL)
        self.m_menu_file.Append(self.m_menuItem_file_new)

        self.m_menu_file.AppendSeparator()

        self.m_menuItem_file_open = wx.MenuItem(self.m_menu_file, wx.ID_ANY,
                                                u"Open", wx.EmptyString,
                                                wx.ITEM_NORMAL)
        self.m_menu_file.Append(self.m_menuItem_file_open)

        self.m_menu_file.AppendSeparator()

        self.m_menuItem_file_save = wx.MenuItem(self.m_menu_file, wx.ID_ANY,
                                                u"Save", wx.EmptyString,
                                                wx.ITEM_NORMAL)
        self.m_menu_file.Append(self.m_menuItem_file_save)

        self.m_menu_file.AppendSeparator()

        self.m_menuItem_file_saveImg = wx.MenuItem(self.m_menu_file, wx.ID_ANY,
                                                   u"SaveImage",
                                                   wx.EmptyString,
                                                   wx.ITEM_NORMAL)
        self.m_menu_file.Append(self.m_menuItem_file_saveImg)

        self.m_menubar_mainform.Append(self.m_menu_file, u"File")

        self.m_menu_help = wx.Menu()
        self.m_menuItem_help_show_log = wx.MenuItem(self.m_menu_help,
                                                    wx.ID_ANY, u"Show Log",
                                                    wx.EmptyString,
                                                    wx.ITEM_NORMAL)
        self.m_menu_help.Append(self.m_menuItem_help_show_log)

        self.m_menubar_mainform.Append(self.m_menu_help, u"help")

        self.SetMenuBar(self.m_menubar_mainform)

        self.m_toolBar_mainform = self.CreateToolBar(wx.TB_HORIZONTAL,
                                                     wx.ID_ANY)
        self.m_toolBar_mainform.Realize()

        self.m_statusBar_mainform = self.CreateStatusBar(
            1, wx.STB_SIZEGRIP, wx.ID_ANY)
        bSizer_b0 = wx.BoxSizer(wx.HORIZONTAL)

        bSizer_b1_1 = wx.BoxSizer(wx.VERTICAL)

        bSizer_b2_1 = wx.BoxSizer(wx.VERTICAL)

        bSizer_b3_1 = wx.BoxSizer(wx.HORIZONTAL)

        self.m_panel_main = wx.Panel(self, wx.ID_ANY, wx.DefaultPosition,
                                     wx.DefaultSize, wx.TAB_TRAVERSAL)
        self.m_panel_main.SetForegroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        bSizer_b3_1.Add(self.m_panel_main, 1, wx.EXPAND | wx.ALL, 5)

        self.m_scrollBar_main_v = wx.ScrollBar(self, wx.ID_ANY,
                                               wx.DefaultPosition,
                                               wx.DefaultSize, wx.SB_VERTICAL)
        bSizer_b3_1.Add(self.m_scrollBar_main_v, 0, wx.ALL | wx.EXPAND, 5)

        bSizer_b2_1.Add(bSizer_b3_1, 1, wx.EXPAND, 5)

        self.m_scrollBar_main_h = wx.ScrollBar(self, wx.ID_ANY,
                                               wx.DefaultPosition,
                                               wx.DefaultSize,
                                               wx.SB_HORIZONTAL)
        bSizer_b2_1.Add(self.m_scrollBar_main_h, 0, wx.ALL | wx.EXPAND, 5)

        bSizer_b1_1.Add(bSizer_b2_1, 1, wx.EXPAND, 5)

        bSizer_b0.Add(bSizer_b1_1, 4, wx.EXPAND, 5)

        bSizer_b1_2 = wx.BoxSizer(wx.VERTICAL)

        self.m_choicebook_box = wx.Choicebook(self, wx.ID_ANY,
                                              wx.DefaultPosition,
                                              wx.DefaultSize, wx.CHB_DEFAULT)
        self.m_scrolledWindow_box_list = wx.ScrolledWindow(
            self.m_choicebook_box, wx.ID_ANY, wx.DefaultPosition,
            wx.DefaultSize, wx.HSCROLL | wx.VSCROLL)
        self.m_scrolledWindow_box_list.SetScrollRate(5, 5)
        gSizer_toolbox = wx.GridSizer(0, 2, 0, 0)

        self.m_button_Line = wx.Button(self.m_scrolledWindow_box_list,
                                       wx.ID_ANY, u"Line", wx.DefaultPosition,
                                       wx.DefaultSize, 0)
        gSizer_toolbox.Add(self.m_button_Line, 0, wx.ALIGN_CENTER | wx.ALL, 5)

        self.m_button2 = wx.Button(self.m_scrolledWindow_box_list, wx.ID_ANY,
                                   u"MyButton", wx.DefaultPosition,
                                   wx.DefaultSize, 0)
        gSizer_toolbox.Add(self.m_button2, 0, wx.ALIGN_CENTER | wx.ALL, 5)

        self.m_scrolledWindow_box_list.SetSizer(gSizer_toolbox)
        self.m_scrolledWindow_box_list.Layout()
        gSizer_toolbox.Fit(self.m_scrolledWindow_box_list)
        self.m_choicebook_box.AddPage(self.m_scrolledWindow_box_list, u"base",
                                      False)
        bSizer_b1_2.Add(self.m_choicebook_box, 1, wx.EXPAND | wx.ALL, 5)

        bSizer_b0.Add(bSizer_b1_2, 1, wx.EXPAND, 5)

        self.SetSizer(bSizer_b0)
        self.Layout()

        self.Centre(wx.BOTH)

        # Connect Events
        self.Bind(wx.EVT_CHAR, self.onMainFormChar)
        self.Bind(wx.EVT_KEY_DOWN, self.onMainFormKeyDown)
        self.Bind(wx.EVT_KEY_UP, self.onMainFormKeyUp)
        self.Bind(wx.EVT_MENU,
                  self.onSelectMenuItemFileNew,
                  id=self.m_menuItem_file_new.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onSelectMenuItemFileOpen,
                  id=self.m_menuItem_file_open.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onSelectMenuItemFileSave,
                  id=self.m_menuItem_file_save.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onSelectMenuItemFileSaveImg,
                  id=self.m_menuItem_file_saveImg.GetId())
        self.Bind(wx.EVT_MENU,
                  self.onSelectMenuItemHelpShowLog,
                  id=self.m_menuItem_help_show_log.GetId())
        self.m_panel_main.Bind(wx.EVT_CHAR, self.onMainPanelChar)
        self.m_panel_main.Bind(wx.EVT_KEY_DOWN, self.onMainPanelKeyDown)
        self.m_panel_main.Bind(wx.EVT_KEY_UP, self.onMainPanelKeyUp)
        self.m_panel_main.Bind(wx.EVT_LEFT_DOWN, self.onMainPanelLeftDown)
        self.m_panel_main.Bind(wx.EVT_LEFT_UP, self.onMainPanelLeftUp)
        self.m_panel_main.Bind(wx.EVT_MOTION, self.onMainPanelMotion)
        self.m_panel_main.Bind(wx.EVT_PAINT, self.onMainPanelPaint)
        self.m_button_Line.Bind(wx.EVT_BUTTON, self.onButtonLineClick)
Example #21
0
    def __init__(self, parent):
        wx.Panel.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          pos=wx.DefaultPosition,
                          size=wx.Size(647, 394),
                          style=wx.TAB_TRAVERSAL)

        fgSizer4 = wx.FlexGridSizer(2, 2, 0, 0)
        fgSizer4.AddGrowableCol(0)
        fgSizer4.AddGrowableCol(1)
        fgSizer4.AddGrowableRow(0)
        fgSizer4.SetFlexibleDirection(wx.BOTH)
        fgSizer4.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        sbSizer4 = wx.StaticBoxSizer(
            wx.StaticBox(self, wx.ID_ANY, u"Spaltenlayout"), wx.VERTICAL)

        fgSizer8 = wx.FlexGridSizer(2, 1, 0, 0)
        fgSizer8.AddGrowableCol(0)
        fgSizer8.AddGrowableRow(1)
        fgSizer8.SetFlexibleDirection(wx.BOTH)
        fgSizer8.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.choisebook_type = wx.Choicebook(self, wx.ID_ANY,
                                             wx.DefaultPosition,
                                             wx.DefaultSize, wx.CHB_DEFAULT)
        self.panel_phone = wx.Panel(self.choisebook_type, wx.ID_ANY,
                                    wx.DefaultPosition, wx.DefaultSize,
                                    wx.TAB_TRAVERSAL)
        fgSizer22 = wx.FlexGridSizer(2, 2, 0, 0)
        fgSizer22.AddGrowableCol(1)
        fgSizer22.SetFlexibleDirection(wx.BOTH)
        fgSizer22.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.m_staticText27 = wx.StaticText(self.panel_phone, wx.ID_ANY,
                                            u"Land / Region",
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        self.m_staticText27.Wrap(-1)
        fgSizer22.Add(self.m_staticText27, 0,
                      wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        fgSizer23 = wx.FlexGridSizer(2, 2, 0, 0)
        fgSizer23.AddGrowableCol(1)
        fgSizer23.SetFlexibleDirection(wx.BOTH)
        fgSizer23.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        combobox_region_codeChoices = []
        self.combobox_region_code = wx.ComboBox(self.panel_phone, wx.ID_ANY,
                                                wx.EmptyString,
                                                wx.DefaultPosition,
                                                wx.Size(80, -1),
                                                combobox_region_codeChoices, 0)
        fgSizer23.Add(self.combobox_region_code, 0, wx.ALL, 5)

        combobox_region_nameChoices = []
        self.combobox_region_name = wx.ComboBox(self.panel_phone, wx.ID_ANY,
                                                wx.EmptyString,
                                                wx.DefaultPosition,
                                                wx.DefaultSize,
                                                combobox_region_nameChoices, 0)
        fgSizer23.Add(self.combobox_region_name, 0, wx.ALL | wx.EXPAND, 5)

        fgSizer22.Add(fgSizer23, 1, wx.EXPAND, 5)

        self.m_staticText25 = wx.StaticText(self.panel_phone, wx.ID_ANY,
                                            u"Vorwahl / Ort",
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        self.m_staticText25.Wrap(-1)
        fgSizer22.Add(self.m_staticText25, 0,
                      wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        fgSizer231 = wx.FlexGridSizer(2, 2, 0, 0)
        fgSizer231.AddGrowableCol(1)
        fgSizer231.SetFlexibleDirection(wx.BOTH)
        fgSizer231.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        combobox_region_code1Choices = []
        self.combobox_region_code1 = wx.ComboBox(self.panel_phone, wx.ID_ANY,
                                                 wx.EmptyString,
                                                 wx.DefaultPosition,
                                                 wx.Size(80, -1),
                                                 combobox_region_code1Choices,
                                                 0)
        fgSizer231.Add(self.combobox_region_code1, 0, wx.ALL, 5)

        combobox_region_name1Choices = []
        self.combobox_region_name1 = wx.ComboBox(
            self.panel_phone, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition,
            wx.DefaultSize, combobox_region_name1Choices, 0)
        fgSizer231.Add(self.combobox_region_name1, 0, wx.ALL | wx.EXPAND, 5)

        fgSizer22.Add(fgSizer231, 1, wx.EXPAND, 5)

        self.m_staticText26 = wx.StaticText(self.panel_phone, wx.ID_ANY,
                                            u"Ortsanschluss",
                                            wx.DefaultPosition, wx.DefaultSize,
                                            0)
        self.m_staticText26.Wrap(-1)
        fgSizer22.Add(self.m_staticText26, 0,
                      wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.m_textCtrl12 = wx.TextCtrl(self.panel_phone, wx.ID_ANY,
                                        wx.EmptyString, wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        fgSizer22.Add(self.m_textCtrl12, 0, wx.ALL | wx.EXPAND, 5)

        self.m_staticText261 = wx.StaticText(self.panel_phone, wx.ID_ANY,
                                             u"Durchwahl", wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.m_staticText261.Wrap(-1)
        fgSizer22.Add(self.m_staticText261, 0,
                      wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.m_textCtrl13 = wx.TextCtrl(self.panel_phone, wx.ID_ANY,
                                        wx.EmptyString, wx.DefaultPosition,
                                        wx.DefaultSize, 0)
        fgSizer22.Add(self.m_textCtrl13, 0, wx.ALL | wx.EXPAND, 5)

        self.panel_phone.SetSizer(fgSizer22)
        self.panel_phone.Layout()
        fgSizer22.Fit(self.panel_phone)
        self.choisebook_type.AddPage(self.panel_phone, u"Telefon", False)
        self.panel_email = wx.Panel(self.choisebook_type, wx.ID_ANY,
                                    wx.DefaultPosition, wx.DefaultSize,
                                    wx.TAB_TRAVERSAL)
        self.choisebook_type.AddPage(self.panel_email, u"a page", False)
        self.panel_website = wx.Panel(self.choisebook_type, wx.ID_ANY,
                                      wx.DefaultPosition, wx.DefaultSize,
                                      wx.TAB_TRAVERSAL)
        self.choisebook_type.AddPage(self.panel_website, u"a page", False)
        self.panel_facebook = wx.Panel(self.choisebook_type, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       wx.TAB_TRAVERSAL)
        self.choisebook_type.AddPage(self.panel_facebook, u"a page", False)
        fgSizer8.Add(self.choisebook_type, 1, wx.EXPAND | wx.ALL, 5)

        sbSizer4.Add(fgSizer8, 1, wx.EXPAND, 5)

        fgSizer4.Add(sbSizer4, 1, wx.EXPAND, 5)

        self.SetSizer(fgSizer4)
        self.Layout()
Example #22
0
    def __init__(self, parent):
        wx.Frame.__init__(self,
                          parent,
                          id=wx.ID_ANY,
                          title=u"MCDI GUI 应用程序",
                          pos=wx.DefaultPosition,
                          size=wx.Size(480, 448),
                          style=wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX
                          | wx.TAB_TRAVERSAL)

        self.SetSizeHints(wx.Size(-1, -1), wx.Size(-1, -1))
        self.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MainContainer = wx.BoxSizer(wx.VERTICAL)

        self.MIDIPages = wx.Listbook(self, wx.ID_ANY, wx.DefaultPosition,
                                     wx.DefaultSize, wx.LB_DEFAULT)
        self.MIDIPageFile = wx.ScrolledWindow(self.MIDIPages, wx.ID_ANY,
                                              wx.DefaultPosition,
                                              wx.DefaultSize,
                                              wx.HSCROLL | wx.VSCROLL)
        self.MIDIPageFile.SetScrollRate(5, 5)
        self.MIDIPageFile.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MIDIPageFileContainer = wx.BoxSizer(wx.VERTICAL)

        MIDIPageFile1 = wx.FlexGridSizer(0, 2, 0, 0)
        MIDIPageFile1.SetFlexibleDirection(wx.BOTH)
        MIDIPageFile1.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.MIDIPathPrompt = wx.StaticText(self.MIDIPageFile, wx.ID_ANY,
                                            u"MIDI文件 路径:", wx.DefaultPosition,
                                            wx.DefaultSize, 0)
        self.MIDIPathPrompt.Wrap(-1)

        MIDIPageFile1.Add(self.MIDIPathPrompt, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.MIDIPathPicker = wx.FilePickerCtrl(self.MIDIPageFile, wx.ID_ANY,
                                                wx.EmptyString, u"选择一个MIDI文件",
                                                u"*.mid", wx.DefaultPosition,
                                                wx.DefaultSize,
                                                wx.FLP_DEFAULT_STYLE)
        MIDIPageFile1.Add(self.MIDIPathPicker, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        MIDIPageFileContainer.Add(MIDIPageFile1, 0, wx.EXPAND, 5)

        MIDIPageFile2 = wx.FlexGridSizer(0, 2, 0, 0)
        MIDIPageFile2.SetFlexibleDirection(wx.BOTH)
        MIDIPageFile2.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.DotMCPathPrompt = wx.StaticText(self.MIDIPageFile, wx.ID_ANY,
                                             u".minecraft 目录:",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.DotMCPathPrompt.Wrap(-1)

        MIDIPageFile2.Add(self.DotMCPathPrompt, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.DotMCPathPicker = wx.DirPickerCtrl(self.MIDIPageFile, wx.ID_ANY,
                                                wx.EmptyString,
                                                u"Select a folder",
                                                wx.DefaultPosition,
                                                wx.Size(-1, -1),
                                                wx.DIRP_DEFAULT_STYLE)
        self.DotMCPathPicker.SetFont(
            wx.Font(wx.NORMAL_FONT.GetPointSize(), wx.FONTFAMILY_DEFAULT,
                    wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False,
                    wx.EmptyString))

        MIDIPageFile2.Add(self.DotMCPathPicker, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        MIDIPageFileContainer.Add(MIDIPageFile2, 0, wx.EXPAND, 5)

        MIDIPageFile3 = wx.FlexGridSizer(0, 3, 0, 0)
        MIDIPageFile3.SetFlexibleDirection(wx.BOTH)
        MIDIPageFile3.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.MCVersionPrompt = wx.StaticText(self.MIDIPageFile, wx.ID_ANY,
                                             u"Minecraft 版本:",
                                             wx.DefaultPosition,
                                             wx.DefaultSize, 0)
        self.MCVersionPrompt.Wrap(-1)

        MIDIPageFile3.Add(self.MCVersionPrompt, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        MCVersionPickerChoices = []
        self.MCVersionPicker = wx.Choice(self.MIDIPageFile, wx.ID_ANY,
                                         wx.DefaultPosition, wx.DefaultSize,
                                         MCVersionPickerChoices, 0)
        self.MCVersionPicker.SetSelection(0)
        MIDIPageFile3.Add(self.MCVersionPicker, 0, wx.ALL, 5)

        self.MCVersionShowOld = wx.CheckBox(self.MIDIPageFile, wx.ID_ANY,
                                            u"显示旧版本", wx.DefaultPosition,
                                            wx.DefaultSize, 0)
        MIDIPageFile3.Add(self.MCVersionShowOld, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        MIDIPageFileContainer.Add(MIDIPageFile3, 0, wx.EXPAND, 5)

        MIDIPageFile4 = wx.FlexGridSizer(0, 3, 0, 0)
        MIDIPageFile4.SetFlexibleDirection(wx.BOTH)
        MIDIPageFile4.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.MCWorldPrompt = wx.StaticText(self.MIDIPageFile, wx.ID_ANY,
                                           u"存档 名称:", wx.DefaultPosition,
                                           wx.DefaultSize, 0)
        self.MCWorldPrompt.Wrap(-1)

        MIDIPageFile4.Add(
            self.MCWorldPrompt, 0,
            wx.ALL | wx.ALIGN_CENTER_HORIZONTAL | wx.ALIGN_CENTER_VERTICAL, 5)

        MCWorldPickerChoices = []
        self.MCWorldPicker = wx.Choice(self.MIDIPageFile, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       MCWorldPickerChoices, 0)
        self.MCWorldPicker.SetSelection(0)
        MIDIPageFile4.Add(self.MCWorldPicker, 0, wx.ALL, 5)

        self.MCVersionDependent = wx.CheckBox(self.MIDIPageFile, wx.ID_ANY,
                                              u"禁用版本独立", wx.DefaultPosition,
                                              wx.DefaultSize, 0)
        self.MCVersionDependent.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MIDIPageFile4.Add(self.MCVersionDependent, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        MIDIPageFileContainer.Add(MIDIPageFile4, 0, 0, 5)

        MIDIPageFileAdvance = wx.StaticBoxSizer(
            wx.StaticBox(self.MIDIPageFile, wx.ID_ANY, u"高级选项"), wx.VERTICAL)

        MIDIPageFile5 = wx.FlexGridSizer(2, 3, 0, 0)
        MIDIPageFile5.SetFlexibleDirection(wx.BOTH)
        MIDIPageFile5.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.PackNamespacePrompt = wx.StaticText(
            MIDIPageFileAdvance.GetStaticBox(), wx.ID_ANY, u"命名空间:",
            wx.DefaultPosition, wx.DefaultSize, 0)
        self.PackNamespacePrompt.Wrap(-1)

        MIDIPageFile5.Add(self.PackNamespacePrompt, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.PackNamespaceInput = wx.TextCtrl(
            MIDIPageFileAdvance.GetStaticBox(), wx.ID_ANY, wx.EmptyString,
            wx.DefaultPosition, wx.DefaultSize, 0)
        MIDIPageFile5.Add(self.PackNamespaceInput, 0, wx.ALL, 5)

        self.PackNamespaceAuto = wx.CheckBox(
            MIDIPageFileAdvance.GetStaticBox(), wx.ID_ANY, u"自动设定",
            wx.DefaultPosition, wx.DefaultSize, 0)
        self.PackNamespaceAuto.SetValue(True)
        MIDIPageFile5.Add(self.PackNamespaceAuto, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.PackIdentifierPrompt = wx.StaticText(
            MIDIPageFileAdvance.GetStaticBox(), wx.ID_ANY, u"包名称:",
            wx.DefaultPosition, wx.DefaultSize, 0)
        self.PackIdentifierPrompt.Wrap(-1)

        MIDIPageFile5.Add(self.PackIdentifierPrompt, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.PackIdentifierInput = wx.TextCtrl(
            MIDIPageFileAdvance.GetStaticBox(), wx.ID_ANY, wx.EmptyString,
            wx.DefaultPosition, wx.DefaultSize, 0)
        MIDIPageFile5.Add(self.PackIdentifierInput, 0, wx.ALL, 5)

        self.PackIdentifierAuto = wx.CheckBox(
            MIDIPageFileAdvance.GetStaticBox(), wx.ID_ANY, u"自动设定",
            wx.DefaultPosition, wx.DefaultSize, 0)
        self.PackIdentifierAuto.SetValue(True)
        MIDIPageFile5.Add(self.PackIdentifierAuto, 0,
                          wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        MIDIPageFileAdvance.Add(MIDIPageFile5, 1, wx.EXPAND, 5)

        MIDIPageFileContainer.Add(MIDIPageFileAdvance, 0, wx.EXPAND, 5)

        self.MIDIPageFile.SetSizer(MIDIPageFileContainer)
        self.MIDIPageFile.Layout()
        MIDIPageFileContainer.Fit(self.MIDIPageFile)
        self.MIDIPages.AddPage(self.MIDIPageFile, u"文件与生成", False)
        self.MIDIPageTiming = wx.ScrolledWindow(self.MIDIPages, wx.ID_ANY,
                                                wx.DefaultPosition,
                                                wx.DefaultSize,
                                                wx.HSCROLL | wx.VSCROLL)
        self.MIDIPageTiming.SetScrollRate(5, 5)
        self.MIDIPageTiming.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MIDIPageTimingContainer = wx.BoxSizer(wx.VERTICAL)

        self.MIDIPageTimingPages = wx.Choicebook(self.MIDIPageTiming,
                                                 wx.ID_ANY, wx.DefaultPosition,
                                                 wx.DefaultSize,
                                                 wx.CHB_DEFAULT)
        self.TimingFlex = wx.Panel(self.MIDIPageTimingPages, wx.ID_ANY,
                                   wx.DefaultPosition, wx.DefaultSize,
                                   wx.TAB_TRAVERSAL)
        MIDIPageTiming1 = wx.FlexGridSizer(0, 2, 0, 0)
        MIDIPageTiming1.SetFlexibleDirection(wx.BOTH)
        MIDIPageTiming1.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.FlexDurationPrompt = wx.StaticText(self.TimingFlex, wx.ID_ANY,
                                                u"时长(自动=0,秒):",
                                                wx.DefaultPosition,
                                                wx.DefaultSize, 0)
        self.FlexDurationPrompt.Wrap(-1)

        MIDIPageTiming1.Add(self.FlexDurationPrompt, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.FlexDurationSpin = wx.SpinCtrlDouble(
            self.TimingFlex, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition,
            wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 65535, 0, 0.5)
        self.FlexDurationSpin.SetDigits(0)
        MIDIPageTiming1.Add(self.FlexDurationSpin, 0, wx.ALL, 5)

        self.FlexTolerancePrompt = wx.StaticText(self.TimingFlex, wx.ID_ANY,
                                                 u"容差(正负秒):",
                                                 wx.DefaultPosition,
                                                 wx.DefaultSize, 0)
        self.FlexTolerancePrompt.Wrap(-1)

        MIDIPageTiming1.Add(self.FlexTolerancePrompt, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.FlexToleranceSpin = wx.SpinCtrlDouble(
            self.TimingFlex, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition,
            wx.DefaultSize, wx.SP_ARROW_KEYS, 0.1, 127, 3, 0.1)
        self.FlexToleranceSpin.SetDigits(0)
        MIDIPageTiming1.Add(self.FlexToleranceSpin, 0, wx.ALL, 5)

        self.FlexSteppingPrompt = wx.StaticText(self.TimingFlex, wx.ID_ANY,
                                                u"步进(秒,过大无效):",
                                                wx.DefaultPosition,
                                                wx.DefaultSize, 0)
        self.FlexSteppingPrompt.Wrap(-1)

        MIDIPageTiming1.Add(self.FlexSteppingPrompt, 0, wx.ALL, 5)

        self.FlexSteppingSpin = wx.SpinCtrlDouble(
            self.TimingFlex, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition,
            wx.DefaultSize, wx.SP_ARROW_KEYS, 0.01, 1, 0.100000, 0.01)
        self.FlexSteppingSpin.SetDigits(0)
        MIDIPageTiming1.Add(self.FlexSteppingSpin, 0, wx.ALL, 5)

        self.TimingFlex.SetSizer(MIDIPageTiming1)
        self.TimingFlex.Layout()
        MIDIPageTiming1.Fit(self.TimingFlex)
        self.MIDIPageTimingPages.AddPage(self.TimingFlex, u"弹性时长(推荐)", True)
        self.TimingStaticT = wx.Panel(self.MIDIPageTimingPages, wx.ID_ANY,
                                      wx.DefaultPosition, wx.DefaultSize,
                                      wx.TAB_TRAVERSAL)
        MIDIPageTiming2 = wx.FlexGridSizer(0, 2, 0, 0)
        MIDIPageTiming2.SetFlexibleDirection(wx.BOTH)
        MIDIPageTiming2.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.StaticTickRatePrompt = wx.StaticText(self.TimingStaticT,
                                                  wx.ID_ANY, u"刻速率(1/x):",
                                                  wx.DefaultPosition,
                                                  wx.DefaultSize, 0)
        self.StaticTickRatePrompt.Wrap(-1)

        MIDIPageTiming2.Add(self.StaticTickRatePrompt, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.StaticTickRateSpin = wx.SpinCtrlDouble(
            self.TimingStaticT, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition,
            wx.DefaultSize, wx.SP_ARROW_KEYS, 1, 65535, 50, 0.1)
        self.StaticTickRateSpin.SetDigits(0)
        MIDIPageTiming2.Add(self.StaticTickRateSpin, 0, wx.ALL, 5)

        self.TimingStaticT.SetSizer(MIDIPageTiming2)
        self.TimingStaticT.Layout()
        MIDIPageTiming2.Fit(self.TimingStaticT)
        self.MIDIPageTimingPages.AddPage(self.TimingStaticT, u"固定刻速率", False)
        self.TimingStaticD = wx.Panel(self.MIDIPageTimingPages, wx.ID_ANY,
                                      wx.DefaultPosition, wx.DefaultSize,
                                      wx.TAB_TRAVERSAL)
        MIDIPageTiming3 = wx.FlexGridSizer(0, 2, 0, 0)
        MIDIPageTiming3.SetFlexibleDirection(wx.BOTH)
        MIDIPageTiming3.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.StaticDurationPrompt = wx.StaticText(self.TimingStaticD,
                                                  wx.ID_ANY, u"时长(自动=0,秒):",
                                                  wx.DefaultPosition,
                                                  wx.DefaultSize, 0)
        self.StaticDurationPrompt.Wrap(-1)

        MIDIPageTiming3.Add(self.StaticDurationPrompt, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.StaticDurationSpin = wx.SpinCtrlDouble(
            self.TimingStaticD, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition,
            wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 65535, 0.000000, 0.5)
        self.StaticDurationSpin.SetDigits(0)
        MIDIPageTiming3.Add(self.StaticDurationSpin, 0, wx.ALL, 5)

        self.TimingStaticD.SetSizer(MIDIPageTiming3)
        self.TimingStaticD.Layout()
        MIDIPageTiming3.Fit(self.TimingStaticD)
        self.MIDIPageTimingPages.AddPage(self.TimingStaticD, u"固定时长", False)
        MIDIPageTimingContainer.Add(self.MIDIPageTimingPages, 1,
                                    wx.EXPAND | wx.ALL, 5)

        self.MIDIPageTiming.SetSizer(MIDIPageTimingContainer)
        self.MIDIPageTiming.Layout()
        MIDIPageTimingContainer.Fit(self.MIDIPageTiming)
        self.MIDIPages.AddPage(self.MIDIPageTiming, u"时序", False)
        self.MIDIPageEffect = wx.Panel(self.MIDIPages, wx.ID_ANY,
                                       wx.DefaultPosition, wx.DefaultSize,
                                       wx.TAB_TRAVERSAL)
        self.MIDIPageEffect.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MIDIPageEffectContainer = wx.BoxSizer(wx.VERTICAL)

        MIDIPageEffect1 = wx.FlexGridSizer(0, 3, 0, 0)
        MIDIPageEffect1.SetFlexibleDirection(wx.BOTH)
        MIDIPageEffect1.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.EffectAllowPan = wx.CheckBox(self.MIDIPageEffect, wx.ID_ANY,
                                          u"允许立体声像", wx.DefaultPosition,
                                          wx.DefaultSize, 0)
        self.EffectAllowPan.SetValue(True)
        MIDIPageEffect1.Add(self.EffectAllowPan, 0, wx.ALL, 5)

        self.EffectAllowGVol = wx.CheckBox(self.MIDIPageEffect, wx.ID_ANY,
                                           u"允许全局音量", wx.DefaultPosition,
                                           wx.DefaultSize, 0)
        self.EffectAllowGVol.SetValue(True)
        MIDIPageEffect1.Add(self.EffectAllowGVol, 0, wx.ALL, 5)

        self.EffectAllowPitch = wx.CheckBox(self.MIDIPageEffect, wx.ID_ANY,
                                            u"允许弯音轮", wx.DefaultPosition,
                                            wx.DefaultSize, 0)
        self.EffectAllowPitch.SetValue(True)
        MIDIPageEffect1.Add(self.EffectAllowPitch, 0, wx.ALL, 5)

        MIDIPageEffectContainer.Add(MIDIPageEffect1, 0, wx.EXPAND, 5)

        MIDIPageEffect2 = wx.FlexGridSizer(0, 2, 0, 0)
        MIDIPageEffect2.SetFlexibleDirection(wx.BOTH)
        MIDIPageEffect2.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.EffectPitchFactorPrompt = wx.StaticText(self.MIDIPageEffect,
                                                     wx.ID_ANY, u"弯音系数(倍率):",
                                                     wx.DefaultPosition,
                                                     wx.DefaultSize, 0)
        self.EffectPitchFactorPrompt.Wrap(-1)

        MIDIPageEffect2.Add(self.EffectPitchFactorPrompt, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.EffectPitchFactorSpin = wx.SpinCtrlDouble(
            self.MIDIPageEffect, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition,
            wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 1, 1.000000, 0.01)
        self.EffectPitchFactorSpin.SetDigits(0)
        MIDIPageEffect2.Add(self.EffectPitchFactorSpin, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.EffectVolumeFactorPrompt = wx.StaticText(self.MIDIPageEffect,
                                                      wx.ID_ANY, u"音量系数(倍率):",
                                                      wx.DefaultPosition,
                                                      wx.DefaultSize, 0)
        self.EffectVolumeFactorPrompt.Wrap(-1)

        MIDIPageEffect2.Add(self.EffectVolumeFactorPrompt, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.EffectVolumeFactorSpin = wx.SpinCtrlDouble(
            self.MIDIPageEffect, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition,
            wx.DefaultSize, wx.SP_ARROW_KEYS, 0.1, 5, 1.000000, 0.1)
        self.EffectVolumeFactorSpin.SetDigits(0)
        MIDIPageEffect2.Add(self.EffectVolumeFactorSpin, 0, wx.ALL, 5)

        MIDIPageEffectContainer.Add(MIDIPageEffect2, 0, wx.EXPAND, 5)

        MIDIPageEffect3 = wx.FlexGridSizer(0, 3, 0, 0)
        MIDIPageEffect3.SetFlexibleDirection(wx.BOTH)
        MIDIPageEffect3.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.EffectDoLongAnalysis = wx.CheckBox(self.MIDIPageEffect, wx.ID_ANY,
                                                u"长音分析", wx.DefaultPosition,
                                                wx.DefaultSize, 0)
        self.EffectDoLongAnalysis.SetValue(True)
        MIDIPageEffect3.Add(self.EffectDoLongAnalysis, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.LongAnalysisThresholdPrompt = wx.StaticText(
            self.MIDIPageEffect, wx.ID_ANY, u"阈值(刻):", wx.DefaultPosition,
            wx.DefaultSize, 0)
        self.LongAnalysisThresholdPrompt.Wrap(-1)

        MIDIPageEffect3.Add(self.LongAnalysisThresholdPrompt, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.LongAnalysisThresholdSpin = wx.SpinCtrlDouble(
            self.MIDIPageEffect, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition,
            wx.DefaultSize, wx.SP_ARROW_KEYS, 1, 120, 40, 1)
        self.LongAnalysisThresholdSpin.SetDigits(0)
        MIDIPageEffect3.Add(self.LongAnalysisThresholdSpin, 0, wx.ALL, 5)

        MIDIPageEffectContainer.Add(MIDIPageEffect3, 0, wx.EXPAND, 5)

        MIDIPageEffect4 = wx.FlexGridSizer(0, 2, 0, 0)
        MIDIPageEffect4.SetFlexibleDirection(wx.BOTH)
        MIDIPageEffect4.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.MaxTickNotePrompt = wx.StaticText(self.MIDIPageEffect, wx.ID_ANY,
                                               u"单刻最大发音数:", wx.DefaultPosition,
                                               wx.DefaultSize, 0)
        self.MaxTickNotePrompt.Wrap(-1)

        MIDIPageEffect4.Add(self.MaxTickNotePrompt, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.MaxTickNoteSpin = wx.SpinCtrl(self.MIDIPageEffect, wx.ID_ANY,
                                           wx.EmptyString, wx.DefaultPosition,
                                           wx.DefaultSize, wx.SP_ARROW_KEYS, 1,
                                           511, 255)
        MIDIPageEffect4.Add(self.MaxTickNoteSpin, 0, wx.ALL, 5)

        MIDIPageEffectContainer.Add(MIDIPageEffect4, 0, wx.EXPAND, 5)

        MIDIPageEffect5 = wx.FlexGridSizer(0, 2, 0, 0)
        MIDIPageEffect5.SetFlexibleDirection(wx.BOTH)
        MIDIPageEffect5.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.WrapLengthPrompt = wx.StaticText(self.MIDIPageEffect, wx.ID_ANY,
                                              u"折行长度(格):", wx.DefaultPosition,
                                              wx.DefaultSize, 0)
        self.WrapLengthPrompt.Wrap(-1)

        MIDIPageEffect5.Add(self.WrapLengthPrompt, 0,
                            wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.WrapLengthSpin = wx.SpinCtrl(self.MIDIPageEffect, wx.ID_ANY,
                                          wx.EmptyString, wx.DefaultPosition,
                                          wx.DefaultSize, wx.SP_ARROW_KEYS, 1,
                                          65535, 128)
        MIDIPageEffect5.Add(self.WrapLengthSpin, 0, wx.ALL, 5)

        MIDIPageEffectContainer.Add(MIDIPageEffect5, 1, wx.EXPAND, 5)

        self.EffectFunctionBased = wx.CheckBox(self.MIDIPageEffect, wx.ID_ANY,
                                               u"基于函数的刻阵列(实验性)",
                                               wx.DefaultPosition,
                                               wx.DefaultSize, 0)
        self.EffectFunctionBased.SetValue(True)
        MIDIPageEffectContainer.Add(self.EffectFunctionBased, 0, wx.ALL, 5)

        self.MIDIPageEffect.SetSizer(MIDIPageEffectContainer)
        self.MIDIPageEffect.Layout()
        MIDIPageEffectContainer.Fit(self.MIDIPageEffect)
        self.MIDIPages.AddPage(self.MIDIPageEffect, u"效果与性能", False)
        self.MIDIPageFrontend = wx.ScrolledWindow(self.MIDIPages, wx.ID_ANY,
                                                  wx.DefaultPosition,
                                                  wx.DefaultSize,
                                                  wx.HSCROLL | wx.VSCROLL)
        self.MIDIPageFrontend.SetScrollRate(5, 5)
        self.MIDIPageFrontend.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MIDIPageFrontendContainer = wx.BoxSizer(wx.VERTICAL)

        self.FrontendPicker = wx.Choicebook(self.MIDIPageFrontend, wx.ID_ANY,
                                            wx.DefaultPosition, wx.DefaultSize,
                                            wx.CHB_DEFAULT)
        self.FrontendPicker.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MIDIPageFrontendContainer.Add(self.FrontendPicker, 1,
                                      wx.EXPAND | wx.ALL, 5)

        self.MIDIPageFrontend.SetSizer(MIDIPageFrontendContainer)
        self.MIDIPageFrontend.Layout()
        MIDIPageFrontendContainer.Fit(self.MIDIPageFrontend)
        self.MIDIPages.AddPage(self.MIDIPageFrontend, u"前端", False)
        self.MIDIPagePlugins = wx.ScrolledWindow(self.MIDIPages, wx.ID_ANY,
                                                 wx.DefaultPosition,
                                                 wx.DefaultSize,
                                                 wx.HSCROLL | wx.VSCROLL)
        self.MIDIPagePlugins.SetScrollRate(5, 5)
        self.MIDIPagePlugins.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MIDIPagePluginsContainer = wx.BoxSizer(wx.VERTICAL)

        PluginsListChoices = []
        self.PluginsList = wx.CheckListBox(self.MIDIPagePlugins, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           PluginsListChoices,
                                           wx.LB_ALWAYS_SB | wx.LB_MULTIPLE)
        MIDIPagePluginsContainer.Add(self.PluginsList, 0, wx.ALL | wx.EXPAND,
                                     5)

        self.PluginsPicker = wx.Choicebook(self.MIDIPagePlugins, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.CHB_DEFAULT)
        MIDIPagePluginsContainer.Add(self.PluginsPicker, 1, wx.ALL | wx.EXPAND,
                                     5)

        self.MIDIPagePlugins.SetSizer(MIDIPagePluginsContainer)
        self.MIDIPagePlugins.Layout()
        MIDIPagePluginsContainer.Fit(self.MIDIPagePlugins)
        self.MIDIPages.AddPage(self.MIDIPagePlugins, u"插件", False)
        self.MIDIPageMiddles = wx.ScrolledWindow(self.MIDIPages, wx.ID_ANY,
                                                 wx.DefaultPosition,
                                                 wx.DefaultSize,
                                                 wx.HSCROLL | wx.VSCROLL)
        self.MIDIPageMiddles.SetScrollRate(5, 5)
        self.MIDIPageMiddles.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MIDIPageMiddlesContainer = wx.BoxSizer(wx.VERTICAL)

        MiddlesListChoices = []
        self.MiddlesList = wx.CheckListBox(self.MIDIPageMiddles, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           MiddlesListChoices,
                                           wx.LB_ALWAYS_SB | wx.LB_MULTIPLE)
        MIDIPageMiddlesContainer.Add(self.MiddlesList, 0, wx.ALL | wx.EXPAND,
                                     5)

        self.MiddlesPicker = wx.Choicebook(self.MIDIPageMiddles, wx.ID_ANY,
                                           wx.DefaultPosition, wx.DefaultSize,
                                           wx.CHB_DEFAULT)
        MIDIPageMiddlesContainer.Add(self.MiddlesPicker, 1, wx.ALL | wx.EXPAND,
                                     5)

        self.MIDIPageMiddles.SetSizer(MIDIPageMiddlesContainer)
        self.MIDIPageMiddles.Layout()
        MIDIPageMiddlesContainer.Fit(self.MIDIPageMiddles)
        self.MIDIPages.AddPage(self.MIDIPageMiddles, u"中间件", False)
        self.MIDIPageAbout = wx.Panel(self.MIDIPages, wx.ID_ANY,
                                      wx.DefaultPosition, wx.DefaultSize,
                                      wx.TAB_TRAVERSAL)
        self.MIDIPageAbout.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW))

        MIDIPageAboutContainer = wx.BoxSizer(wx.VERTICAL)

        self.MIDIPageAboutHTML = wx.html.HtmlWindow(self.MIDIPageAbout,
                                                    wx.ID_ANY,
                                                    wx.DefaultPosition,
                                                    wx.DefaultSize,
                                                    wx.html.HW_SCROLLBAR_AUTO)
        MIDIPageAboutContainer.Add(self.MIDIPageAboutHTML, 1,
                                   wx.ALL | wx.EXPAND, 5)

        self.MIDIPageAbout.SetSizer(MIDIPageAboutContainer)
        self.MIDIPageAbout.Layout()
        MIDIPageAboutContainer.Fit(self.MIDIPageAbout)
        self.MIDIPages.AddPage(self.MIDIPageAbout, u"关于", True)

        MainContainer.Add(self.MIDIPages, 1, wx.EXPAND | wx.ALL, 5)

        Bottom = wx.FlexGridSizer(0, 3, 0, 0)
        Bottom.SetFlexibleDirection(wx.BOTH)
        Bottom.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.Run = wx.Button(self, wx.ID_ANY, u"生成", wx.DefaultPosition,
                             wx.DefaultSize, 0)
        Bottom.Add(self.Run, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.GoDefault = wx.Button(self, wx.ID_ANY, u"取消", wx.DefaultPosition,
                                   wx.DefaultSize, 0)
        Bottom.Add(self.GoDefault, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        self.ProgressBar = wx.Gauge(self, wx.ID_ANY, 100, wx.DefaultPosition,
                                    wx.DefaultSize,
                                    wx.GA_HORIZONTAL | wx.GA_SMOOTH)
        self.ProgressBar.SetValue(0)
        Bottom.Add(self.ProgressBar, 0, wx.ALL | wx.ALIGN_CENTER_VERTICAL, 5)

        MainContainer.Add(Bottom, 0, wx.EXPAND, 5)

        self.SetSizer(MainContainer)
        self.Layout()
        self.StatusBar = self.CreateStatusBar(
            1, wx.STB_ELLIPSIZE_MIDDLE | wx.STB_SIZEGRIP, wx.ID_ANY)

        self.Centre(wx.BOTH)