Example #1
0
    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, -1)

        self.CreateStatusBar(1)
        pub.subscribe(self.change_statusbar, "change.statusbar")
        tempheading = ((" ", 10), (" ", 15), (" ", 10))

        self.panel_login = panel_login(self, -1)

        self.panes = {}
        self.panes["base"] = self.panel_base = panel_base(self, -1)  # top horizontal ctrls
        self.panes["rereg_list"] = self.panel_rereg_list = panel_rereg_list(self, -1)
        self.panes["edit_booking"] = self.panel_edit_booking = panel_edit_booking(self, -1)
        self.panes["edit_courses"] = self.panel_courses = panel_courses_picker(self, -1)
        self.panes["student_details"] = self.panel_student_details = panel_student_details(self, -1)
        self.panes["add_edit_course"] = self.panel_add_edit_course = panel_add_edit_course(self, -1)
        self.panes["course_bookings"] = self.panel_course_bookings = panel_course_bookings(self, -1)
        self.panes["edit_rereg_status"] = self.panel_edit_rereg_status = panel_edit_rereg_status(self, -1)
        self.panes["edit_booking_status"] = self.panel_edit_booking_status = panel_edit_booking_status(self, -1)
        self.panes["edit_guardian_data"] = self.panel_guardian_data = panel_edit_guardian(self, 1)
        self.panes["course_fees"] = self.panel_course_fees = panel_course_fees(self, -1)
        self.panes["edit_schools"] = self.panel_edit_school = panel_edit_school(self, -1)
        self.panes["edit_address"] = self.panel_edit_address = panel_edit_address(self, -1)
        self.panes[
            "edit_booking_student_details"
        ] = self.panel_edit_booking_student_details = panel_edit_booking_student_details(self, -1)

        self.Bind(wx.EVT_CLOSE, self.OnClose, self)
        self.__set_properties()
        self.__do_layout()
        self.__do_main()
Example #2
0
    def __init__(self, *args, **kwds):
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)

        gVar.schYr = 2015

        menubar  = wx.MenuBar()
        fileMenu = wx.Menu()
        mnuitem1 = fileMenu.Append(-1, 'Forms',   'Edit Forms')
        mnuitem2 = fileMenu.Append(-1, 'Courses', 'Edit Courses')
        menubar.Append(fileMenu, '&Settings')

        self.SetMenuBar(menubar)

        self.statusbar = CustomStatusBar(self)
        self.SetStatusBar(self.statusbar)

        self.panel_tree = wx.Panel(self, -1)

        self.panel_tree_top = wx.Panel(self.panel_tree, -1)

        self.logo        = wx.Button(self.panel_tree_top,   -1, '')
        self.button_year = wx.Button(self.panel_tree_top,   -1, '2015/16')
        self.tree        = self.__createTreeCtrl() #self._createComboTreeBox(0)

        self.panel_main  = wx.Panel(self, -1)

        self.pane_base      = panel_base(self.panel_main, -1)
        self.pane_ledger    = panel_ledger(self.panel_main, -1)
        self.pane_journal   = panel_journal(self.panel_main, -1)
        self.pane_payments  = panel_payments(self.panel_main, -1)
        self.pane_accounts  = panel_accounts(self.panel_main, -1)
        self.pane_suppliers   = panel_suppliers(self.panel_main, -1)
        self.pane_course_fees = panel_course_fees(self.panel_main, -1)
        self.pane_edit_school = panel_edit_school(self.panel_main, -1)
        self.pane_edit_booking  = panel_edit_booking(self.panel_main, -1)
        self.pane_edit_address  = panel_edit_address(self.panel_main, -1)
        self.pane_edit_guardian = panel_edit_guardian(self.panel_main, -1)
        self.pane_student_list  = panel_student_list(self.panel_main, -1)

        #self.pane_excul  = panel_excul(self.panel_main, -1)

        self.pane_student_details     = panel_student_details(self.panel_main, -1)
        self.pane_course_bookings     = panel_course_bookings(self.panel_main, -1)
        self.pane_edit_rereg_status   = panel_edit_rereg_status(self.panel_main, -1)
        self.pane_class_rereg_status  = panel_form_reregStatus(self.panel_main, -1)
        self.pane_edit_booking_status = panel_edit_booking_status(self.panel_main, -1)
        self.pane_payments_registrations = panel_payments_registrations(self.panel_main, -1)
        self.pane_courses_by_year_picker = panel_courses_picker(self.panel_main, -1)
        self.pane_edit_booking_student_details = panel_edit_booking_student_details(self.panel_main, -1)

        self.panes_dict = { 'Suppliers' :            self.pane_suppliers,
                            'Ledger':                self.pane_ledger,
                            'Accounts':              self.pane_accounts,
                            'Journal':               self.pane_journal,
                            'Student Payments':      self.pane_payments,
                            'Registration Payments': self.pane_payments_registrations,
                            'Base':                  self.pane_base,
                            'Course Fees':           self.pane_course_fees,
                            'Schools':               self.pane_edit_school ,
                            'Bookings':              self.pane_edit_booking  ,
                            'Address':               self.pane_edit_address  ,
                            'Guardians':             self.pane_edit_guardian ,
                            'Student Details':       self.pane_student_details  ,
                            'Course Bookings':       self.pane_course_bookings  ,
                            'Form Rereg Status':     self.pane_class_rereg_status  ,
                            'Edit Rereg Status':     self.pane_edit_rereg_status   ,
                            'Edit Booking Status':   self.pane_edit_booking_status   ,
                            'Courses By Year':       self.pane_courses_by_year_picker  ,
                            'Booking Student Details':self.pane_edit_booking_student_details,
                            'Students': self.pane_student_list
                            }

        self.Bind(wx.EVT_MENU,   self.OnForms,   mnuitem1)
        self.Bind(wx.EVT_MENU,   self.OnCourses, mnuitem2)
        self.Bind(wx.EVT_CLOSE,  self.OnCloseWindow)
        self.Bind(wx.EVT_BUTTON, self.OnYear, self.button_year)

        pub.subscribe(self.write_to_statusbar0, 'write.statusbar0')
        pub.subscribe(self.write_to_statusbar1, 'write.statusbar1')
        pub.subscribe(self.write_to_statusbar2, 'write.statusbar2')
        pub.subscribe(self.lockdown,           'lockdown')
        pub.subscribe(self.unlockdown,         'unlockdown')
        pub.subscribe(self.updateSB,           'accounts.updateSB')

        self.__set_properties()
        self.__do_layout()
        self.__do_main()