def btnLogin_handle(self, event): self.btnSaveSet_handle(event) if os.path.isdir(self.txtSetDownPath.GetValue()) and os.path.isdir( self.txtSetPrintPath.GetValue()): userid = self.txtUserid.GetValue() userpass = self.txtUserpass.GetValue() if (userid == '' or userpass == ''): global_var.warnDialog.html.SetPage(u''' <html> <body bgcolor="#FFEFD5"> <centre><font size=4><strong>用户名和密码不能为空!</font></centre> </body> </html> ''') global_var.warnDialog.SetSize((300, 150)) global_var.warnDialog.SetTitle(u"请输入用户名密码") global_var.warnDialog.ShowModal() else: self.info = [userid, userpass] if (self.autoSaved.GetValue()): global_var.setting['userinfo'][0] = aeslib.encode(userid) global_var.setting['userinfo'][1] = aeslib.encode(userpass) global_var.setting['autologin'] = True GUItools.saveSetting() else: global_var.setting['autologin'] = False GUItools.saveSetting() global_var.setting['userinfo'][0] = aeslib.encode(userid) global_var.setting['userinfo'][1] = aeslib.encode(userpass) self.EndModal(wx.ID_OK) return
def btnLogin_handle(self,event): self.btnSaveSet_handle(event) if os.path.isdir(self.txtSetDownPath.GetValue()) and os.path.isdir(self.txtSetPrintPath.GetValue()): userid=self.txtUserid.GetValue() userpass=self.txtUserpass.GetValue() if (userid == '' or userpass=='' ): global_var.warnDialog.html.SetPage(u''' <html> <body bgcolor="#FFEFD5"> <centre><font size=4><strong>用户名和密码不能为空!</font></centre> </body> </html> ''') global_var.warnDialog.SetSize((300,150)) global_var.warnDialog.SetTitle(u"请输入用户名密码") global_var.warnDialog.ShowModal() else: self.info=[userid,userpass] if (self.autoSaved.GetValue()): global_var.setting['userinfo'][0]=aeslib.encode(userid) global_var.setting['userinfo'][1]=aeslib.encode(userpass) global_var.setting['autologin']=True GUItools.saveSetting() else: global_var.setting['autologin']=False GUItools.saveSetting() global_var.setting['userinfo'][0]=aeslib.encode(userid) global_var.setting['userinfo'][1]=aeslib.encode(userpass) self.EndModal(wx.ID_OK) return
def btnSaveSet_handle(self, event): if os.path.isdir(self.txtSetDownPath.GetValue()) and os.path.isdir( self.txtSetPrintPath.GetValue()): global_var.setting['download_path'] = self.txtSetDownPath.GetValue( ) global_var.setting['print_path'] = self.txtSetPrintPath.GetValue() GUItools.saveSetting() global_var.warnDialog.html.SetPage(u''' <html> <body bgcolor="#FFEFD5"> <centre><font size=4><strong>下载文件夹和打印文件夹的设置保存成功!</font></centre> </body> </html> ''') global_var.warnDialog.SetSize((400, 150)) global_var.warnDialog.SetTitle(u"设置完成") global_var.warnDialog.ShowModal() else: global_var.warnDialog.html.SetPage(u''' <html> <body bgcolor="#FFEFD5"> <centre><font size=4><strong>你设置的文件夹不存在,请重新设置</font></centre> </body> </html> ''') global_var.warnDialog.SetSize((300, 150)) global_var.warnDialog.SetTitle(u"文件夹不存在!") global_var.warnDialog.ShowModal()
def btnSaveSet_handle(self,event): if os.path.isdir(self.txtSetDownPath.GetValue()) and os.path.isdir(self.txtSetPrintPath.GetValue()): global_var.setting['download_path']=self.txtSetDownPath.GetValue() global_var.setting['print_path']=self.txtSetPrintPath.GetValue() GUItools.saveSetting() global_var.warnDialog.html.SetPage(u''' <html> <body bgcolor="#FFEFD5"> <centre><font size=4><strong>下载文件夹和打印文件夹的设置保存成功!</font></centre> </body> </html> ''') global_var.warnDialog.SetSize((400,150)) global_var.warnDialog.SetTitle(u"设置完成") global_var.warnDialog.ShowModal() else: global_var.warnDialog.html.SetPage(u''' <html> <body bgcolor="#FFEFD5"> <centre><font size=4><strong>你设置的文件夹不存在,请重新设置</font></centre> </body> </html> ''') global_var.warnDialog.SetSize((300,150)) global_var.warnDialog.SetTitle(u"文件夹不存在!") global_var.warnDialog.ShowModal()