示例#1
0
    def __init__(self, parent, dataSource):
        # Call the base class constructors.
        Observer.__init__(self)
        # Get a handle to the parent window.
        self.parent = parent
        # Setup a view to handle the user interface.
        self.view = SpectatorView(parent)
        # Bind events to handlers.
        self.view.okBtn.Bind(wx.EVT_BUTTON, self.onOK)
        self.view.cancelBtn.Bind(wx.EVT_BUTTON, self.onCancel)
        self.view.Bind(wx.EVT_CLOSE, self.onClosing)

        self.view.olv.SetObjects(dataSource.getRacerList())
        self.selectedObjects = []
        self.updatedObjects = []
示例#2
0
    def __init__(self, parent, dataSource):
        # Call the base class constructors.
        Observer.__init__(self)

        # Handle to parent window.
        self.parent = parent

        # Set up the user interface. 
        self.view = PromoterView(parent)
        self.view.addBtn.Bind(wx.EVT_BUTTON, self.onAdd)
        self.view.delBtn.Bind(wx.EVT_BUTTON, self.onRemove)
        self.view.Bind(wx.EVT_CLOSE, self.onClose) 
        
        # A promoter has a jumbotron display window.
        self.jumbotron = JumbotronUIMixin(self.view)
        self.jumbotron.Bind(wx.EVT_CLOSE, self.onClose) 
       
        # Populate the object list view control on the left
        # with all of the racers in the database.
        self.view.olv.SetObjects(dataSource.getRacerList())