diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..e9fdea8
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,11 @@
+{
+ "configurations": [
+ {
+ "type": "java",
+ "name": "CodeLens (Launch) - Main",
+ "request": "launch",
+ "vmArgs": "--module-path C:/Users/Gazebo/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls,javafx.fxml,javafx.base,javafx.graphics,javafx.media,javafx.swing,javafx.web",
+ "mainClass": "Interface.MainApp"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Interface/SextaFeiraInterface/.classpath b/Interface/SextaFeiraInterface/.classpath
new file mode 100644
index 0000000..e3a5aa4
--- /dev/null
+++ b/Interface/SextaFeiraInterface/.classpath
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/SextaFeiraInterface/.project b/Interface/SextaFeiraInterface/.project
new file mode 100644
index 0000000..edf08cc
--- /dev/null
+++ b/Interface/SextaFeiraInterface/.project
@@ -0,0 +1,23 @@
+
+
+ SextaFeiraInterface
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+
+
diff --git a/Interface/SextaFeiraInterface/.settings/org.eclipse.core.resources.prefs b/Interface/SextaFeiraInterface/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..abdea9a
--- /dev/null
+++ b/Interface/SextaFeiraInterface/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding/=UTF-8
diff --git a/Interface/SextaFeiraInterface/.settings/org.eclipse.jdt.apt.core.prefs b/Interface/SextaFeiraInterface/.settings/org.eclipse.jdt.apt.core.prefs
new file mode 100644
index 0000000..d4313d4
--- /dev/null
+++ b/Interface/SextaFeiraInterface/.settings/org.eclipse.jdt.apt.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.apt.aptEnabled=false
diff --git a/Interface/SextaFeiraInterface/.settings/org.eclipse.jdt.core.prefs b/Interface/SextaFeiraInterface/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b11489f
--- /dev/null
+++ b/Interface/SextaFeiraInterface/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,9 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
+org.eclipse.jdt.core.compiler.processAnnotations=disabled
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/Interface/SextaFeiraInterface/.settings/org.eclipse.m2e.core.prefs b/Interface/SextaFeiraInterface/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/Interface/SextaFeiraInterface/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/Interface/SextaFeiraInterface/src/main/java/Interface/FXMLController.java b/Interface/SextaFeiraInterface/src/main/java/Interface/FXMLController.java
index a58eb6e..b347700 100644
--- a/Interface/SextaFeiraInterface/src/main/java/Interface/FXMLController.java
+++ b/Interface/SextaFeiraInterface/src/main/java/Interface/FXMLController.java
@@ -126,7 +126,7 @@ private void connectionLoop() {
if (!tableView.getColumns().contains(commandColumn)) {
imageView.setVisible(false);
- setTableData("getInteractions");
+ setTableData();
addInteractionsColumns();
@@ -137,7 +137,7 @@ private void connectionLoop() {
case 2:
if (!tableView.getColumns().contains(homeWorkColumn)) {
imageView.setVisible(false);
- setTableData("getHomeWorks");
+ setTableData();
addHomeWorksColumns();
}
break;
@@ -145,7 +145,7 @@ private void connectionLoop() {
case 3:
if (!tableView.getColumns().contains(projectColumn)) {
imageView.setVisible(false);
- setTableData("getProjects");
+ setTableData();
addProjectsColumns();
}
break;
@@ -154,7 +154,7 @@ private void connectionLoop() {
if (!tableView.getColumns().contains(DeviceColumn)) {
imageView.setVisible(false);
- setTableData("getDevices");
+ setTableData();
addDevicesColumns();
@@ -383,10 +383,10 @@ public ObservableValue call(CellDataFeatures param) {
tableView.setVisible(true);
}
- private void setTableData(String request){
+ private void setTableData(){
tableView.getItems().clear();
- response = (JSONObject) connection.receive(request);
+ response = (JSONObject) FridayComunication.readJsonFile().get("content");
System.out.println(response);
for (int c = 0; c < response.size(); c++) {
diff --git a/Interface/SextaFeiraInterface/target/classes/Interface/Configurations.class b/Interface/SextaFeiraInterface/target/classes/Interface/Configurations.class
new file mode 100644
index 0000000..6e04d14
Binary files /dev/null and b/Interface/SextaFeiraInterface/target/classes/Interface/Configurations.class differ
diff --git a/Interface/SextaFeiraInterface/target/classes/Interface/FXMLController.class b/Interface/SextaFeiraInterface/target/classes/Interface/FXMLController.class
new file mode 100644
index 0000000..8a7cbd5
Binary files /dev/null and b/Interface/SextaFeiraInterface/target/classes/Interface/FXMLController.class differ
diff --git a/Interface/SextaFeiraInterface/target/classes/Interface/FridayComunication.class b/Interface/SextaFeiraInterface/target/classes/Interface/FridayComunication.class
new file mode 100644
index 0000000..12a1378
Binary files /dev/null and b/Interface/SextaFeiraInterface/target/classes/Interface/FridayComunication.class differ
diff --git a/Interface/SextaFeiraInterface/target/classes/Interface/MainApp.class b/Interface/SextaFeiraInterface/target/classes/Interface/MainApp.class
new file mode 100644
index 0000000..eef68c3
Binary files /dev/null and b/Interface/SextaFeiraInterface/target/classes/Interface/MainApp.class differ
diff --git a/Interface/SextaFeiraInterface/target/classes/fxml/Scene.fxml b/Interface/SextaFeiraInterface/target/classes/fxml/Scene.fxml
new file mode 100644
index 0000000..d128a93
--- /dev/null
+++ b/Interface/SextaFeiraInterface/target/classes/fxml/Scene.fxml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Interface/SextaFeiraInterface/target/classes/styles/BackgroundFriday.jpg b/Interface/SextaFeiraInterface/target/classes/styles/BackgroundFriday.jpg
new file mode 100644
index 0000000..07d16fc
Binary files /dev/null and b/Interface/SextaFeiraInterface/target/classes/styles/BackgroundFriday.jpg differ
diff --git a/Interface/SextaFeiraInterface/target/classes/styles/Styles.css b/Interface/SextaFeiraInterface/target/classes/styles/Styles.css
new file mode 100644
index 0000000..c7c7648
--- /dev/null
+++ b/Interface/SextaFeiraInterface/target/classes/styles/Styles.css
@@ -0,0 +1,4 @@
+.bodybg{
+ -fx-background-image: url('BackgroundFriday.jpg');
+ -fx-background-size: 100% 100%;
+}
\ No newline at end of file
diff --git a/Server/DevicesStatus.json b/Server/DevicesStatus.json
index 139f56d..440337d 100644
--- a/Server/DevicesStatus.json
+++ b/Server/DevicesStatus.json
@@ -1,10 +1,16 @@
{
"Friday": {
"action": 0,
+ "content":{
+
+ },
"url": ".com"
},
"Interface": {
"action": 1,
+ "content":{
+
+ },
"url": ".com"
}
}
\ No newline at end of file
diff --git a/Server/Server.py b/Server/Server.py
index 90bebf2..d25c518 100644
--- a/Server/Server.py
+++ b/Server/Server.py
@@ -44,7 +44,6 @@ def setDevicesStatus(receiverID, action, url):
newJson[receiverID]['action'] = action
newJson[receiverID]['url'] = url
- newJson.update()
writeFile = open('E:/Sexta-Feira-Mark_6/Server/DevicesStatus.json', 'w')
json.dump(newJson, writeFile, indent=4)
@@ -234,8 +233,6 @@ def handle(self):
clientRequest['command'])
self.request.send(json.dumps({'requestStatus': True}).encode())
-
-
else:
break
diff --git a/Sexta-Feira(A.I.)/Commands.py b/Sexta-Feira(A.I.)/Commands.py
index 5006d5b..f9f0328 100644
--- a/Sexta-Feira(A.I.)/Commands.py
+++ b/Sexta-Feira(A.I.)/Commands.py
@@ -19,10 +19,11 @@ def updateFriday(speech, connection):
os.system('git reset --hard origin/master')
def sendCloseToInterface(speech, connection):
- connection.send(Functions.setRequestJson('setDevicesStatus', 'Interface', 0, '.com'))
-
+ Functions.setFridayComunication(0, None, ".com")
+
def sendInteractionsToInterface(speech, connection):
- connection.send(Functions.setRequestJson('setDevicesStatus', 'Interface', 1, '.com'))
+ response = connection.send(Functions.setRequestJson('getInteractions', 'Interface', 1, '.com'))
+ Functions.setFridayComunication(1, response, ".com")
def sendHomeWorksToInterface(speech, connection):
connection.send(Functions.setRequestJson('setDevicesStatus', 'Interface', 2, '.com'))
diff --git a/Sexta-Feira(A.I.)/Functions.py b/Sexta-Feira(A.I.)/Functions.py
index 00df714..8596389 100644
--- a/Sexta-Feira(A.I.)/Functions.py
+++ b/Sexta-Feira(A.I.)/Functions.py
@@ -114,7 +114,19 @@ def run(self):
writeFile = open('E:/Sexta-Feira-Mark_6/Interface/Interface/FridayComunication.json', 'w')
json.dump(response['Interface'], writeFile, indent=4)
+def setFridayComunication(action, content, url):
+ readFile = open('E:/Sexta-Feira-Mark_6/Interface/Interface/FridayComunication.json', 'r')
+
+ newJson = json.load(readFile)
+
+ print(newJson)
+
+ newJson['action'] = action
+ newJson['content'] = action
+ newJson['url'] = url
+ writeFile = open('E:/Sexta-Feira-Mark_6/Interface/Interface/FridayComunication.json', 'w')
+ json.dump(newJson, writeFile, indent=4)