Exemplo n.º 1
0
    def onConfirm(self, e):
        username = self.user_txt.GetValue()
        password = self.pass_txt.GetValue()
        config = Config.get_instance()
        if username == "" or password == "":
            return

        config.set("username", username)
        config.set("password", password)

        wx.MessageBox(
            "Account info updated. Please restart the program",
            "Info",
            wx.OK | wx.ICON_INFORMATION,
        )
        self.Destroy()
Exemplo n.º 2
0
 def loadText(self):
     config = Config.get_instance()
     (username, password) = (config.get("username"), config.get("password"))
     if username and password:
         self.user_txt.SetValue(username)
         self.pass_txt.SetValue(password)