EyeXion 3 years ago
parent
commit
3eb543adce

BIN
build/libs/Clavardage-1.0-all.jar View File


+ 6
- 6
build/libs/config.properties View File

@@ -3,15 +3,15 @@
3 3
 # For more information, visit https://www.etud.insa-toulouse.fr/~tali/DownloadPageJigglyMessenger/
4 4
 
5 5
 # The broadcast address of the local network
6
-app.localNetIPAddress=10.1.5.255
6
+app.localNetIPAddress=192.168.1.255
7 7
 # Port number use by the application (more than 1024)
8 8
 app.udpPortNumber=12345
9 9
 # Servlet URL : DON'T FORGET THE LAST "/"
10
-app.servletURL=https://srv-gei-tomcat.insa-toulouse.fr/ServletJiggly/
10
+app.servletURL=http://192.168.1.18:8080/Gradle___com_example___ServeurClavardage_1_0_SNAPSHOT_war/
11 11
 # The Database Address (URL or IP)
12
-app.dataBaseAddress=srv-bdens.insa-toulouse.fr
13
-app.dataBaseUser=tp_servlet_013
12
+app.dataBaseAddress=192.168.1.18
13
+app.dataBaseUser=root
14 14
 # The Database user password
15
-app.dataBasePasswd=eiN3ahng
15
+app.dataBasePasswd=0000
16 16
 # The Database name
17
-app.dataBaseName=tp_servlet_013
17
+app.dataBaseName=testDBChat

+ 7
- 0
src/main/java/app/insa/clav/Core/Model.java View File

@@ -67,6 +67,7 @@ public class Model implements PropertyChangeListener{
67 67
      * Vrai si pseudo ok, faux sinon
68 68
      */
69 69
     private boolean isPseudoOk = true;
70
+    private boolean configure;
70 71
 
71 72
 
72 73
     /**
@@ -89,6 +90,7 @@ public class Model implements PropertyChangeListener{
89 90
     public Model(String addrBroadcast, int portListening, Application app, String addrBdd, String userBdd, String mdpBdd, String nomBdd, String urlServeur) {
90 91
         this.addrBroadcast = addrBroadcast;
91 92
         this.portListening = portListening;
93
+        this.configure = false;
92 94
 
93 95
         try {
94 96
             this.user = new Utilisateurs("NA", InetAddress.getLocalHost(), 0, 0);
@@ -148,6 +150,11 @@ public class Model implements PropertyChangeListener{
148 150
 
149 151
         this.openInputUDP();
150 152
         this.openTCPListener();
153
+        this.configure = true;
154
+    }
155
+
156
+    public boolean isConfigured() {
157
+        return this.configure;
151 158
     }
152 159
 
153 160
 

+ 8
- 2
src/main/java/app/insa/clav/UIControllers/ConnectionScreenController.java View File

@@ -171,7 +171,9 @@ public class ConnectionScreenController implements Initializable, PropertyChange
171 171
                 if (this.isOutdoor) {
172 172
                     this.model.choosePseudoOutdoor(pseudo,true,true);
173 173
                 } else {
174
-                    model.configModelIndoor();
174
+                    if (!model.isConfigured()) {
175
+                        model.configModelIndoor();
176
+                    }
175 177
                     this.model.choosePseudo(pseudo,true,true);
176 178
                 }
177 179
             } else {
@@ -206,7 +208,9 @@ public class ConnectionScreenController implements Initializable, PropertyChange
206 208
                 if (this.isOutdoor) {
207 209
                     this.model.choosePseudoOutdoor(pseudoUp,true,true);
208 210
                 } else {
209
-                    model.configModelIndoor();
211
+                    if (!model.isConfigured()) {
212
+                        model.configModelIndoor();
213
+                    }
210 214
                     this.model.choosePseudo(pseudoUp,true,true);
211 215
                 }
212 216
             }
@@ -216,6 +220,8 @@ public class ConnectionScreenController implements Initializable, PropertyChange
216 220
                 this.isSubmittingUp = false;
217 221
             }
218 222
         }
223
+        this.signInButton.setDisable(false);
224
+        this.signUpButton.setDisable(false);
219 225
     }
220 226
 
221 227
     /**

Loading…
Cancel
Save