From 68402ee958da3c03b5ce4fe25aecb56b5a6e76b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lie=20=20AKLI?= <pr1temps@live.fr>
Date: Fri, 14 May 2021 17:44:25 +0000
Subject: [PATCH] Update controleur.py

---
 pyAmakIHM/classes/controleur.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/pyAmakIHM/classes/controleur.py b/pyAmakIHM/classes/controleur.py
index 61e975c..18185e9 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) 
+
+    
+    
-- 
GitLab