diff --git a/Dump Banco de Dados/DumpSextaFeiraDataBase.sql b/Dump Banco de Dados/DumpSextaFeiraDataBase.sql index 01dc244..c5a5320 100644 --- a/Dump Banco de Dados/DumpSextaFeiraDataBase.sql +++ b/Dump Banco de Dados/DumpSextaFeiraDataBase.sql @@ -1,3 +1,5 @@ +CREATE DATABASE IF NOT EXISTS `sextafeiradatabase` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; +USE `sextafeiradatabase`; -- MySQL dump 10.13 Distrib 8.0.19, for Win64 (x86_64) -- -- Host: localhost Database: sextafeiradatabase @@ -28,7 +30,7 @@ CREATE TABLE `device` ( `DeviceDescription` text, `DeviceJson` text, PRIMARY KEY (`DeviceID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -37,6 +39,7 @@ CREATE TABLE `device` ( LOCK TABLES `device` WRITE; /*!40000 ALTER TABLE `device` DISABLE KEYS */; +INSERT INTO `device` VALUES (1,'Device','Description','Json'),(2,'newDevice','newDevice','newDevice'),(3,'newDevice','newDevice','newDevice'); /*!40000 ALTER TABLE `device` ENABLE KEYS */; UNLOCK TABLES; @@ -55,7 +58,7 @@ CREATE TABLE `homeworkmanagement` ( `HomeWorkDelivery` date DEFAULT NULL, `HomeWorkDescription` text, PRIMARY KEY (`HomeWorkID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -64,6 +67,7 @@ CREATE TABLE `homeworkmanagement` ( LOCK TABLES `homeworkmanagement` WRITE; /*!40000 ALTER TABLE `homeworkmanagement` DISABLE KEYS */; +INSERT INTO `homeworkmanagement` VALUES (1,'Type','subject','homework','2020-06-02','desc'),(2,'newHomeWork','newHomeWork','newHomeWork','2020-06-02','newHomeWork'); /*!40000 ALTER TABLE `homeworkmanagement` ENABLE KEYS */; UNLOCK TABLES; @@ -84,7 +88,7 @@ CREATE TABLE `interactions` ( `Response3` text, `Command` varchar(30) DEFAULT NULL, PRIMARY KEY (`InteractionID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -93,6 +97,7 @@ CREATE TABLE `interactions` ( LOCK TABLES `interactions` WRITE; /*!40000 ALTER TABLE `interactions` DISABLE KEYS */; +INSERT INTO `interactions` VALUES (1,'ola','ola','ola','olá chefe','olá chefe','olá chefe',''),(2,'horas','sao','sao','','','','dateTime'),(3,'fech','tabela','tabela','','','','sendCloseToInterface'),(4,'mostr','interacoes','interacoes','Atualmente essas são as interações contidas no meu banco de dados','Essas são todas as interações contidas no meu banco de dados','Aqui estão as interações contidas no meu banco de dados','sendInteractionsToInterface'),(5,'mostr','tarefa','tarefa','Essas são todas as suas tarefas pendentes','Aqui estão as suas tarefas pendentes','Atualmente essas são suas tarefas pendentes','sendHomeWorksToInterface'),(6,'mostr','projeto','projeto','Esses são todos os projetos em andamento','Aqui estão os projetos em desenvolvimento','Atualmente esse são os projetos em desenvolvimento','sendProjectsToInterface'),(7,'mostr','device','device','Esses são os devices sincronizados','Aqui estão os devices sincronizados','Atualmente esse são os devices sincronizados com o meu sistema','sendDevicesToInterface'),(8,'fech','image','image','','','','sendCloseToInterface'),(9,'mostr','tabela','periodica','tabela periodica aberta','tabela periodica aberta','tabela periodica aberta','sendPeriodicTableToInterface'),(10,'mostr','mapa','brasil politico','Esse é o mapa político do Brasil','Esse é o mapa político do Brasil','Esse é o mapa político do Brasil','sendPoliticalBrazilToInterface'); /*!40000 ALTER TABLE `interactions` ENABLE KEYS */; UNLOCK TABLES; @@ -108,7 +113,7 @@ CREATE TABLE `projects` ( `ProjectName` varchar(60) DEFAULT NULL, `ProjectLanguages` varchar(30) DEFAULT NULL, PRIMARY KEY (`ProjectID`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -117,6 +122,7 @@ CREATE TABLE `projects` ( LOCK TABLES `projects` WRITE; /*!40000 ALTER TABLE `projects` DISABLE KEYS */; +INSERT INTO `projects` VALUES (1,'Project','language'),(2,'NewProject','Python'); /*!40000 ALTER TABLE `projects` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -129,4 +135,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2020-05-31 21:53:52 +-- Dump completed on 2020-06-19 21:00:51 diff --git a/Images/BackgroundFriday.png b/Images/BackgroundFriday.png new file mode 100644 index 0000000..e54aee0 Binary files /dev/null and b/Images/BackgroundFriday.png differ diff --git "a/Images/Brasil Pol\303\255tico.jpg" "b/Images/Brasil Pol\303\255tico.jpg" new file mode 100644 index 0000000..72fe154 Binary files /dev/null and "b/Images/Brasil Pol\303\255tico.jpg" differ diff --git "a/Images/Equa\303\247\303\265es Dinamica.png" "b/Images/Equa\303\247\303\265es Dinamica.png" new file mode 100644 index 0000000..020ae88 Binary files /dev/null and "b/Images/Equa\303\247\303\265es Dinamica.png" differ diff --git "a/Images/Mapa Mundi vegeta\303\247\303\243o.jpg" "b/Images/Mapa Mundi vegeta\303\247\303\243o.jpg" new file mode 100644 index 0000000..b769490 Binary files /dev/null and "b/Images/Mapa Mundi vegeta\303\247\303\243o.jpg" differ diff --git a/Images/Mapa Mundi.jpg b/Images/Mapa Mundi.jpg new file mode 100644 index 0000000..ad2f719 Binary files /dev/null and b/Images/Mapa Mundi.jpg differ diff --git a/Images/TabelaSenoCossenoTangente.png b/Images/TabelaSenoCossenoTangente.png new file mode 100644 index 0000000..939ff56 Binary files /dev/null and b/Images/TabelaSenoCossenoTangente.png differ diff --git a/Images/diagrama-de-pauling.jpg b/Images/diagrama-de-pauling.jpg new file mode 100644 index 0000000..bf3e57e Binary files /dev/null and b/Images/diagrama-de-pauling.jpg differ diff --git a/Interface/Interface/src/main/java/FridayInterface/FXMLController.java b/Interface/Interface/src/main/java/FridayInterface/FXMLController.java index 68b2808..5bf6a94 100644 --- a/Interface/Interface/src/main/java/FridayInterface/FXMLController.java +++ b/Interface/Interface/src/main/java/FridayInterface/FXMLController.java @@ -128,13 +128,7 @@ private void connectionLoop() { case 1: if (!tableView.getColumns().contains(commandColumn)) { - - /*for (int c = 0; c < response.size(); c++) { - arrayResponse = (JSONArray) response.get(Integer.toString(c)); - tableViewData.add(arrayResponse); - } - System.out.println(tableViewData.getClass().getName()); - tableView.setItems(tableViewData);*/ + imageView.setVisible(false); setTableData("getInteractions"); addInteractionsColumns(); @@ -145,6 +139,7 @@ private void connectionLoop() { case 2: if (!tableView.getColumns().contains(homeWorkColumn)) { + imageView.setVisible(false); setTableData("getHomeWorks"); addHomeWorksColumns(); } @@ -152,15 +147,7 @@ private void connectionLoop() { case 3: if (!tableView.getColumns().contains(projectColumn)) { - /*response = (JSONObject) connection.receive("getDevicesJsons"); - - for (int c = 0; c < response.size(); c++) { - arrayResponse = (JSONArray) response.get(Integer.toString(c)); - tableViewData.add(arrayResponse); - System.out.println(arrayResponse); - } - tableView.setItems(tableViewData); - System.out.println("TableView dados >>> " + tableView.getItems());*/ + imageView.setVisible(false); setTableData("getProjects"); addProjectsColumns(); } @@ -169,15 +156,7 @@ private void connectionLoop() { case 4: if (!tableView.getColumns().contains(DeviceColumn)) { - /*response = (JSONObject) connection.receive("getDevicesJsons"); - - for (int c = 0; c < response.size(); c++) { - arrayResponse = (JSONArray) response.get(Integer.toString(c)); - tableViewData.add(arrayResponse); - System.out.println(arrayResponse); - } - tableView.setItems(tableViewData); - System.out.println("TableView dados >>> " + tableView.getItems());*/ + imageView.setVisible(false); setTableData("getDevicesJsons"); addDevicesColumns(); @@ -187,14 +166,16 @@ private void connectionLoop() { break; case 5: + tableView.setVisible(false); + imagePath = response.get("url").toString(); System.out.println(imagePath); imageFile = new File(imagePath); image = new Image(imageFile.toURI().toString()); imageView.setImage(image); - imageView.setVisible(true); + default: break; } diff --git a/Interface/Interface/src/main/java/FridayInterface/MainApp.java b/Interface/Interface/src/main/java/FridayInterface/MainApp.java index c764693..0527667 100644 --- a/Interface/Interface/src/main/java/FridayInterface/MainApp.java +++ b/Interface/Interface/src/main/java/FridayInterface/MainApp.java @@ -12,17 +12,16 @@ public class MainApp extends Application { @Override public void start(Stage stage) throws Exception { - + Runtime.getRuntime().exec("cmd.exe /c start E:\\Sexta-Feira-Mark_6\\Sexta-Feira(A.I.)\\Sexta-Feira(A.I.).py"); + Parent root = FXMLLoader.load(getClass().getResource("/fxml/Scene.fxml")); Scene scene = new Scene(root); scene.getStylesheets().add("/styles/Styles.css"); - + stage.setTitle("Sexta-Feira"); stage.setScene(scene); - //Runtime.getRuntime().exec("cmd.exe /c start E:\\Sexta-Feira-Mark_6\\Sexta-Feira(A.I.)\\Sexta-Feira(A.I.).py"); - stage.show(); stage.setFullScreen(true); diff --git a/Interface/Interface/src/main/resources/fxml/Scene.fxml b/Interface/Interface/src/main/resources/fxml/Scene.fxml index f0dfa04..d12ce91 100644 --- a/Interface/Interface/src/main/resources/fxml/Scene.fxml +++ b/Interface/Interface/src/main/resources/fxml/Scene.fxml @@ -25,10 +25,10 @@ - + - + diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$10.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$10.class index bb77e99..28964a0 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$10.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$10.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$11.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$11.class index ef1544c..419e3e8 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$11.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$11.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$12.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$12.class index 204deec..8853771 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$12.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$12.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$13.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$13.class index 57f42e0..8f6293f 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$13.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$13.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$14.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$14.class index fead523..e7c84a5 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$14.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$14.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$15.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$15.class index 2d1a3ae..2d55d19 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$15.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$15.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$16.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$16.class index 51fbea3..91d1664 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$16.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$16.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$17.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$17.class index de9ad00..08a4c5f 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$17.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$17.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$18.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$18.class index bf7ed1b..00b49ca 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$18.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$18.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$19.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$19.class index d56257e..916c001 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$19.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$19.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$2.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$2.class index 785af82..f7197c9 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$2.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$2.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$20.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$20.class index 79c1aee..536d982 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$20.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$20.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$21.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$21.class index 85728c7..a9cd921 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$21.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$21.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$22.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$22.class index 00649f3..d2d2dd2 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$22.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$22.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$3.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$3.class index a4f0e37..a3bc16d 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$3.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$3.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$4.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$4.class index 2f787c4..6d2a12c 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$4.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$4.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$5.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$5.class index 171d8f6..10a986b 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$5.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$5.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$6.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$6.class index 4e5e077..8ae8dfe 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$6.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$6.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$7.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$7.class index 577ad85..b6e70f2 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$7.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$7.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$8.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$8.class index 9e2a240..106a72b 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$8.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$8.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$9.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$9.class index 3cf030a..9c64e23 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$9.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController$9.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController.class b/Interface/Interface/target/classes/FridayInterface/FXMLController.class index 9b812ae..1c55f0e 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController.class and b/Interface/Interface/target/classes/FridayInterface/FXMLController.class differ diff --git a/Interface/Interface/target/classes/FridayInterface/MainApp.class b/Interface/Interface/target/classes/FridayInterface/MainApp.class index 3139486..748867d 100644 Binary files a/Interface/Interface/target/classes/FridayInterface/MainApp.class and b/Interface/Interface/target/classes/FridayInterface/MainApp.class differ diff --git a/Interface/Interface/target/classes/fxml/Scene.fxml b/Interface/Interface/target/classes/fxml/Scene.fxml index f0dfa04..d12ce91 100644 --- a/Interface/Interface/target/classes/fxml/Scene.fxml +++ b/Interface/Interface/target/classes/fxml/Scene.fxml @@ -25,10 +25,10 @@ - + - + diff --git a/Server/DevicesStatus.json b/Server/DevicesStatus.json index 07bb131..9d82c5e 100644 --- a/Server/DevicesStatus.json +++ b/Server/DevicesStatus.json @@ -1,7 +1,7 @@ { "Interface": { - "action": 2, - "url": ".com" + "action": 5, + "url": "E:\\Sexta-Feira-Mark_6\\Images\\Equa\u00e7\u00f5es Dinamica.png" }, "Friday": { "action": 0, diff --git a/Server/Server.py b/Server/Server.py index a0eeeaf..675f3a6 100644 --- a/Server/Server.py +++ b/Server/Server.py @@ -10,7 +10,7 @@ print('---SERVER STARTED---') -def convertList(dataBaseList): +def convertList(dataBaseList): indexes = list() for deviceIndex in range(0, len(dataBaseList)): @@ -80,15 +80,19 @@ def handle(self): self.request.send(json.dumps(projects).encode()) elif clientRequest['request'] == 'getHomeWorks': - homeWork = convertList(dataBaseConnection.getHomeWorks()) + listHomeWorks = list() + dataBaseHomeWorks = dataBaseConnection.getHomeWorks() - #for date in range(0, len(homeWork) - 1): - # homeWork[date][4] = datetime.strftime(homeWork[date][4]) - + for homeWork in dataBaseHomeWorks: + homeWork = list(homeWork) + date = datetime.strftime(homeWork[4], '%d/%m/%Y') + homeWork[4] = date - print(homeWork) + listHomeWorks.append(homeWork) - self.request.send(json.dumps(homeWork).encode()) + homeWorkconverted = convertList(listHomeWorks) + + self.request.send(json.dumps(homeWorkconverted).encode()) elif clientRequest['request'] == 'getInteractionsHeader': header = convertHeader(dataBaseConnection.getInteractionsHeader()) diff --git a/Sexta-Feira(A.I.)/Commands.py b/Sexta-Feira(A.I.)/Commands.py index f2f57f8..056729b 100644 --- a/Sexta-Feira(A.I.)/Commands.py +++ b/Sexta-Feira(A.I.)/Commands.py @@ -34,3 +34,15 @@ def sendDevicesToInterface(speech, connection): def sendPeriodicTableToInterface(speech, connection): connection.send(Functions.setRequestJson('setDevicesStatus', 'Interface', 5, 'E:\\Sexta-Feira-Mark_6\\Images\\TabelaPeriodica.jpg')) +def sendPoliticalBrazilToInterface(speech, connection): + connection.send(Functions.setRequestJson('setDevicesStatus', 'Interface', 5, 'E:\\Sexta-Feira-Mark_6\\Images\\Brasil Político.jpg')) + +def sendEletronicDestToInterface(speech, connection): + connection.send(Functions.setRequestJson('setDevicesStatus', 'Interface', 5, 'E:\\Sexta-Feira-Mark_6\\Images\\diagrama-de-pauling.jpg')) + +def sendAnglesTableToInterface(speech, connection): + connection.send(Functions.setRequestJson('setDevicesStatus', 'Interface', 5, 'E:\\Sexta-Feira-Mark_6\\Images\\TabelaSenoCossenoTangente.png')) + +def sendFisicEquationsToInterface(speech, connection): + connection.send(Functions.setRequestJson('setDevicesStatus', 'Interface', 5, 'E:\\Sexta-Feira-Mark_6\\Images\\Equações Dinamica.png')) + diff --git a/Sexta-Feira(A.I.)/__pycache__/Commands.cpython-36.pyc b/Sexta-Feira(A.I.)/__pycache__/Commands.cpython-36.pyc index 3254863..bc2cd71 100644 Binary files a/Sexta-Feira(A.I.)/__pycache__/Commands.cpython-36.pyc and b/Sexta-Feira(A.I.)/__pycache__/Commands.cpython-36.pyc differ