Exemplo n.º 1
0
 def on_login(self, event):
     event.Skip()
     if self.app == 'manager':
         from app.manager.logic.ctrl import CtrlManagerLogin
         CtrlManagerLogin.get_instance().login(self.txtUser.GetValue(), self.txtPassword.GetValue())
     elif self.app == 'front':
         from app.front.logic.ctrl import CtrlFrontLogin
         CtrlFrontLogin.get_instance().login(self.txtUser.GetValue(), self.txtPassword.GetValue())
Exemplo n.º 2
0
 def on_evt_login(self, event):
     event.Skip()
     if self.app == 'manager':
         from app.manager.logic.ctrl import CtrlManagerLogin
         if CtrlManagerLogin.get_instance().get_result():
             AppManager.get_instance().switch_to_application('HomePage')
         else:
             dlg = wx.MessageDialog(self, u"用户名或密码错误", caption=u"登陆")
             dlg.ShowModal()
     elif self.app == 'front':
         from app.front.logic.ctrl import CtrlFrontLogin
         if CtrlFrontLogin.get_instance().get_result():
             AppManager.get_instance().switch_to_application('FrontPage')
         else:
             dlg = wx.MessageDialog(self, u"用户名或密码错误", caption=u"登陆")
             dlg.ShowModal()