diff --git a/pyAmakIHM/classes/controleur.py b/pyAmakIHM/classes/controleur.py index 61e975c07b7c74bb8b20c888ef20786c93283c57..18185e96763749ba51c74bec425a0da8521ceac6 100644 --- a/pyAmakIHM/classes/controleur.py +++ b/pyAmakIHM/classes/controleur.py @@ -251,3 +251,28 @@ class Controleur: def updateClosing(self): self.__amas.exit_program() + + """ + Displaying logs + """ + def errorDisplay(self,typeError : str, message : str) -> None: + if ((typeError != "") and (message != "")) : + self.__panelLogs.displayLog(typeError+" : "+message, self.__panelLogs.getText()) + + elif (typeError == "") : + self.__panelLogs.displayLogs(message, self.__panelLogs.getText()) + + elif (typeError == "" ) : + self.__panelLogs.displayLogs(typeError, self.__panelLogs.getText()) + + else : + print("Empty string for typeError and message : at least one of them must not be empty \n") + + def logsDisplay(self, message : str) -> None: + if (message==""): + print("The message you want to print is empty.\n") + else : + self.__etat.logsDisplay(message) + + +