Exemple #1
0
 def detectSubtypes(self):
     if windows.askUser(
         "Change Subtypes",
         "Software will set default subtypes.\n"
         "Subtypes of most items will be changed",
     ):
         upgradeDB.findSubTypes(dao.getAllItems())
Exemple #2
0
 def saveXML(self):
     for_namalsk = False
     if windows.askUser("Export Types.xml",
                        "Are you exporting for namalsk map?"):
         for_namalsk = True
     xmlPath = windows.saveAsFile("xml", "w+")
     if xmlPath is not None:
         xmlWriter.update(xmlPath, self.selectedMods, namalsk=for_namalsk)
Exemple #3
0
    def checkForDatabase(self):
        try:
            dao.getNominalByType("weapon")
            self.connectionOK = True
        except Exception:
            self.window.withdraw()
            self.openConnectionWindow()
            self.window.deiconify()

        try:
            dao.getSubtypes()
        except Exception:
            windows.showUpgradeError(self.window)
            if windows.askUser("Upgrade",
                               "Do you want to upgrade your Database?"):
                self.upgradeDB()
Exemple #4
0
 def deleteSel(self):
     if windows.askUser(
         "Delete Item", "Are you sure you want to delete selected Item?"
     ):
         dao.deleteItem(self.getSelectedValues(self.tree.focus())["name"])
         self.updateDisplay(dao.reExecuteLastQuery())