Exemplo n.º 1
0
 def initialize(self):
     # Add event listener
     EvtManager.add_listener(self, EnumEvent.EVT_LOGIN, self.on_evt_login)
     
     self.GetParent().SetTitle(u"登陆")
     x, y = CtrlHomePage.get_instance().get_screen_size()
     self.SetSize(wx.Size(x, y))
Exemplo n.º 2
0
    def initialize(self):
        # Add event listener
        EvtManager.add_listener(self, EnumEvent.EVT_FRONT_PAGE_REFRESH, self.on_refresh)

        x, y = CtrlHomePage.get_instance().get_screen_size()
        self.SetSize(wx.Size(x, y))

        self.GetParent().SetTitle(u"收银")
Exemplo n.º 3
0
    def _show_func_buttons(self):
        select_item = CtrlHomePage.get_instance().get_selected_item()
        self.func_num = get_func_number(select_item)

        x, y = self.GetSize()
        btn_y = ((y - 82) - 150) / 2
        btn_x = ((x - 200) - ((self.func_num * 150) + ((self.func_num - 1) * 10))) / 2
        for i in range(self.func_num):
            self.di_funcButtons[i].Move(wx.Point(btn_x + (i * 150), btn_y))
            self.di_funcButtons[i].SetSize(wx.Size(142, 142))
Exemplo n.º 4
0
 def on_func_2(self, event):
     event.Skip()
     select_item = CtrlHomePage.get_instance().get_selected_item()
     AppManager.get_instance().set_app_title(li_func_title_2[select_item])
     self._set_screen_tile()
     if select_item != 5:
         AppManager.get_instance().switch_to_application(li_func_widget_2[select_item])
     else:
         pop_register = PopRegister(self)
         pop_register.ShowModal()
Exemplo n.º 5
0
    def initialize(self):
        # Create an instance of our model...
        self.model = ModelPrinterScheme(CtrlPrinterScheme.get_instance().get_data())
        CtrlPrinterScheme.get_instance().refresh_items()
        # Tell the DVC to use the model
        self.dataViewList.AssociateModel(self.model)

        # Add event listener
        EvtManager.add_listener(self, EnumEvent.EVT_PRINTER_SCHEME_REFRESH, self.on_btn_refresh)
        
        x, y = CtrlHomePage.get_instance().get_screen_size()
        self.SetSize(wx.Size(x, y))
Exemplo n.º 6
0
 def on_func_1(self, event):
     event.Skip()
     select_item = CtrlHomePage.get_instance().get_selected_item()
     AppManager.get_instance().set_app_title(li_func_title_1[select_item])
     self._set_screen_tile()
     if select_item == 1:
         pop_company = PopCompany(self)
         pop_company.ShowModal()
     elif select_item == 5:
         pop_company = PopCompany(self)
         pop_company.ShowModal()
     else:
         AppManager.get_instance().switch_to_application(li_func_widget_1[select_item])
Exemplo n.º 7
0
    def initialize(self):
        # Create an instance of our model...
        self.model = ModelTable(CtrlTable.get_instance().get_data())
        CtrlTable.get_instance().refresh_items()
        # Tell the DVC to use the model
        self.dataViewList.AssociateModel(self.model)
        # Show tree control
        self._show_tree_ctrl()

        # Add event listener
        EvtManager.add_listener(self, EnumEvent.EVT_DINING_ROOM_REFRESH, self.on_btn_refresh)

        x, y = CtrlHomePage.get_instance().get_screen_size()
        self.SetSize(wx.Size(x, y))
Exemplo n.º 8
0
 def on_func_3(self, event):
     event.Skip()
     select_item = CtrlHomePage.get_instance().get_selected_item()
     AppManager.get_instance().set_app_title(li_func_title_3[select_item])
     self._set_screen_tile()
     AppManager.get_instance().switch_to_application(li_func_widget_3[select_item])
Exemplo n.º 9
0
 def on_system_setting(self, event):
     event.Skip()
     CtrlHomePage.get_instance().set_selected_item(5)
     self._show_func_widget(5)
Exemplo n.º 10
0
 def on_report_forms(self, event):
     event.Skip()
     CtrlHomePage.get_instance().set_selected_item(4)
     self._show_func_widget(4)
Exemplo n.º 11
0
 def on_employee_manager(self, event):
     event.Skip()
     CtrlHomePage.get_instance().set_selected_item(2)
     self._show_func_widget(2)
Exemplo n.º 12
0
 def on_dishes_publishing(self, event):
     event.Skip()
     CtrlHomePage.get_instance().set_selected_item(1)
     self._show_func_widget(1)
Exemplo n.º 13
0
 def on_dining_room_setting(self, event):
     event.Skip()
     CtrlHomePage.get_instance().set_selected_item(0)
     self._show_func_widget(0)
Exemplo n.º 14
0
    def initialize(self):
        x, y = CtrlHomePage.get_instance().get_screen_size()
        self.SetSize(wx.Size(x, y))

        select_item = CtrlHomePage.get_instance().get_selected_item()
        self._show_func_widget(select_item)
Exemplo n.º 15
0
 def on_btn_exit(self, event):
     event.Skip()
     self.Hide()
     CtrlHomePage.get_instance().set_selected_item()
     AppManager.get_instance().switch_to_application("HomePage")
Exemplo n.º 16
0
 def on_printer_setting(self, event):
     event.Skip()
     CtrlHomePage.get_instance().set_selected_item(3)
     self._show_func_widget(3)
Exemplo n.º 17
0
 def on_size(self, event):
     event.Skip()
     x, y = self.GetClientSize()
     CtrlHomePage.get_instance().set_screen_size(x, y)
     if self.panel is not None:
         self.panel.SetSize(wx.Size(x, y))