diff --git a/App/.settings/org.eclipse.buildship.core.prefs b/App/.settings/org.eclipse.buildship.core.prefs index d764b34..27b37ed 100644 --- a/App/.settings/org.eclipse.buildship.core.prefs +++ b/App/.settings/org.eclipse.buildship.core.prefs @@ -5,7 +5,7 @@ connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) connection.project.dir= eclipse.preferences.version=1 gradle.user.home= -java.home=C\:/Program Files/Java/jdk1.8.0_181 +java.home=C\:/Program Files/Java/jdk-11.0.8 jvm.arguments= offline.mode=false override.workspace.settings=true diff --git a/Configurations.json b/Configurations.json index aa2d267..00759ba 100644 --- a/Configurations.json +++ b/Configurations.json @@ -1,17 +1,17 @@ { "FridayConfigs": { "ID": "Sexta-Feira", - "ServerHost": "192.168.0.4", + "ServerHost": "192.168.0.5", "Port": 5000 }, "ServerConfigs": { "ID": "Server", - "Host": "192.168.0.4", + "Host": "192.168.0.5", "Port": 5000 }, "InterfaceConfigs": { "ID": "Interface", - "ServerHost": "192.168.0.4", + "ServerHost": "192.168.0.5", "Port": 5000 } } \ No newline at end of file diff --git a/Interface/Interface/.classpath b/Interface/Interface/.classpath deleted file mode 100644 index 1a99fc8..0000000 --- a/Interface/Interface/.classpath +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" output="target/classes" path="src/main/java"> - <attributes> - <attribute name="optional" value="true"/> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> - <attributes> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" output="target/test-classes" path="src/test/java"> - <attributes> - <attribute name="optional" value="true"/> - <attribute name="maven.pomderived" value="true"/> - <attribute name="test" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> - <attributes> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> - <attributes> - <attribute name="maven.pomderived" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="target/generated-sources/annotations"> - <attributes> - <attribute name="optional" value="true"/> - <attribute name="maven.pomderived" value="true"/> - <attribute name="ignore_optional_problems" value="true"/> - <attribute name="m2e-apt" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations"> - <attributes> - <attribute name="optional" value="true"/> - <attribute name="maven.pomderived" value="true"/> - <attribute name="ignore_optional_problems" value="true"/> - <attribute name="m2e-apt" value="true"/> - <attribute name="test" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="output" path="target/classes"/> -</classpath> diff --git a/Interface/Interface/.project b/Interface/Interface/.project deleted file mode 100644 index 060f350..0000000 --- a/Interface/Interface/.project +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>Interface</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.m2e.core.maven2Builder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - <nature>org.eclipse.m2e.core.maven2Nature</nature> - </natures> -</projectDescription> diff --git a/Interface/Interface/.settings/org.eclipse.core.resources.prefs b/Interface/Interface/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index abdea9a..0000000 --- a/Interface/Interface/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/main/resources=UTF-8 -encoding/<project>=UTF-8 diff --git a/Interface/Interface/.settings/org.eclipse.jdt.apt.core.prefs b/Interface/Interface/.settings/org.eclipse.jdt.apt.core.prefs deleted file mode 100644 index d4313d4..0000000 --- a/Interface/Interface/.settings/org.eclipse.jdt.apt.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.apt.aptEnabled=false diff --git a/Interface/Interface/.settings/org.eclipse.jdt.core.prefs b/Interface/Interface/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index b11489f..0000000 --- a/Interface/Interface/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,9 +0,0 @@ -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/Interface/.settings/org.eclipse.m2e.core.prefs b/Interface/Interface/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f..0000000 --- a/Interface/Interface/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/Interface/Interface/src/main/java/FridayInterface/ServerConnection.java b/Interface/Interface/src/main/java/FridayInterface/ServerConnection.java deleted file mode 100644 index 7a18925..0000000 --- a/Interface/Interface/src/main/java/FridayInterface/ServerConnection.java +++ /dev/null @@ -1,72 +0,0 @@ -package FridayInterface; - -import java.io.BufferedInputStream; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.PrintStream; -import java.net.Socket; -import java.util.Scanner; - -import javax.sound.sampled.SourceDataLine; - -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; -import org.json.simple.JSONValue; -import org.json.simple.parser.JSONParser; -import org.json.simple.parser.ParseException; - -public class ServerConnection { - private JSONObject jsonObject; - private JSONObject jsonRequest; - private JSONObject jsonResponse; - private JSONObject jsonInterfaceObject; - private JSONParser parser; - private String ip = Configurations.getConfig("ServerHost"); - private int port = Integer.parseInt(Configurations.getConfig("Port")); - private Socket socket; - private PrintStream out; - private BufferedReader in; - - public ServerConnection() { - try { - this.socket = new Socket(this.ip, this.port); - this.out = new PrintStream(this.socket.getOutputStream()); - this.in = new BufferedReader(new InputStreamReader(this.socket.getInputStream())); - - } catch (IOException e) { - e.printStackTrace(); - } - } - - public JSONObject receive(String request){ - - jsonRequest = new JSONObject(); - jsonRequest.put("header", "gazeboindustries09082004"); - jsonRequest.put("request", request); - - this.out.print(jsonRequest); - - - char[] buffer = new char[5800]; - try { - this.in.read(buffer); - } catch (IOException e) { - e.printStackTrace(); - } - - this.jsonResponse = new JSONObject(); - String data = new String(buffer); - - try { - this.jsonResponse = (JSONObject) JSONValue.parse(data.trim()); - System.out.println(this.jsonResponse.toJSONString()); - } catch (Exception e) { - e.printStackTrace(); - } - - return (JSONObject) this.jsonResponse; - } - -} \ No newline at end of file diff --git a/Interface/Interface/src/main/resources/fxml/Scene.fxml b/Interface/Interface/src/main/resources/fxml/Scene.fxml deleted file mode 100644 index 894b687..0000000 --- a/Interface/Interface/src/main/resources/fxml/Scene.fxml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<?import javafx.scene.text.*?> -<?import javafx.scene.image.*?> -<?import java.lang.*?> -<?import java.util.*?> -<?import javafx.scene.*?> -<?import javafx.scene.control.*?> -<?import javafx.scene.layout.*?> - -<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="720.0" prefWidth="1280.0" styleClass="bodybg" stylesheets="@../styles/Styles.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="FridayInterface.FXMLController"> - <children> - <Label fx:id="lblTime" layoutX="120.0" layoutY="41.0" prefHeight="112.0" prefWidth="187.0" text="12:20" textFill="#ff6600" AnchorPane.leftAnchor="120.0" AnchorPane.topAnchor="41.0"> - <font> - <Font name="Impact" size="68.0" /> - </font> - </Label> - <Label fx:id="lblWeekDay" layoutX="952.0" layoutY="55.0" prefHeight="84.0" prefWidth="358.0" text="Sexta-Feira " textFill="#ff6600" AnchorPane.rightAnchor="-30.0" AnchorPane.topAnchor="55.0"> - <font> - <Font name="Impact" size="55.0" /> - </font> - </Label> - <Label fx:id="lblDayMonth" layoutX="709.0" layoutY="63.0" text="30/06" textFill="#ff6600" AnchorPane.rightAnchor="431.0" AnchorPane.topAnchor="63.0"> - <font> - <Font name="Impact" size="55.0" /> - </font> - </Label> - <TableView fx:id="tableView" editable="true" layoutX="72.0" layoutY="163.0" prefHeight="494.0" prefWidth="1082.0" visible="false" AnchorPane.bottomAnchor="50.0" AnchorPane.leftAnchor="120.0" AnchorPane.rightAnchor="80.0" AnchorPane.topAnchor="200.0"> - <columnResizePolicy> - <TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /> - </columnResizePolicy></TableView> - <ImageView fx:id="imageView" fitHeight="589.0" fitWidth="967.0" layoutX="375.0" layoutY="147.0" nodeOrientation="INHERIT" pickOnBounds="true" visible="false" AnchorPane.leftAnchor="400.0" AnchorPane.topAnchor="200.0" /> - </children> -</AnchorPane> diff --git a/Interface/Interface/target/Interface-6.0.jar b/Interface/Interface/target/Interface-6.0.jar deleted file mode 100644 index 574873e..0000000 Binary files a/Interface/Interface/target/Interface-6.0.jar and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/Configurations.class b/Interface/Interface/target/classes/FridayInterface/Configurations.class deleted file mode 100644 index 7084256..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/Configurations.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$1.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$1.class deleted file mode 100644 index 45b5f5f..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$1.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$10.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$10.class deleted file mode 100644 index 8c56567..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$10.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$11.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$11.class deleted file mode 100644 index 36a4bfd..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$11.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$12.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$12.class deleted file mode 100644 index e398f58..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$12.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$13.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$13.class deleted file mode 100644 index 24c97f9..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$13.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$14.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$14.class deleted file mode 100644 index 9deddc6..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$14.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$15.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$15.class deleted file mode 100644 index 5d0b013..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$15.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$16.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$16.class deleted file mode 100644 index da5cf6f..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$16.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$17.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$17.class deleted file mode 100644 index 96673bc..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$17.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$18.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$18.class deleted file mode 100644 index 407c4a9..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$18.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$19.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$19.class deleted file mode 100644 index 7c5f2ce..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$19.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$2.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$2.class deleted file mode 100644 index 6e387e2..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$2.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$20.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$20.class deleted file mode 100644 index d208736..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$20.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$21.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$21.class deleted file mode 100644 index 4c7e036..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$21.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$22.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$22.class deleted file mode 100644 index 3807fe2..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$22.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$3.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$3.class deleted file mode 100644 index 5d0e31c..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$3.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$4.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$4.class deleted file mode 100644 index 354efdf..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$4.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$5.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$5.class deleted file mode 100644 index 0394c58..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$5.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$6.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$6.class deleted file mode 100644 index 8f751d8..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$6.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$7.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$7.class deleted file mode 100644 index 9d8f02c..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$7.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$8.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$8.class deleted file mode 100644 index cceecd0..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$8.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController$9.class b/Interface/Interface/target/classes/FridayInterface/FXMLController$9.class deleted file mode 100644 index 6fda459..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController$9.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/FXMLController.class b/Interface/Interface/target/classes/FridayInterface/FXMLController.class deleted file mode 100644 index f44c2ca..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/FXMLController.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/MainApp.class b/Interface/Interface/target/classes/FridayInterface/MainApp.class deleted file mode 100644 index 544a19d..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/MainApp.class and /dev/null differ diff --git a/Interface/Interface/target/classes/FridayInterface/ServerConnection.class b/Interface/Interface/target/classes/FridayInterface/ServerConnection.class deleted file mode 100644 index 43ae83a..0000000 Binary files a/Interface/Interface/target/classes/FridayInterface/ServerConnection.class and /dev/null differ diff --git a/Interface/Interface/target/classes/META-INF/MANIFEST.MF b/Interface/Interface/target/classes/META-INF/MANIFEST.MF deleted file mode 100644 index 562d4f2..0000000 --- a/Interface/Interface/target/classes/META-INF/MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bnd-LastModified: 1332231819873 -Build-Jdk: 1.6.0_26 -Built-By: fangyidong -Bundle-Description: A simple Java toolkit for JSON -Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt -Bundle-ManifestVersion: 2 -Bundle-Name: JSON.simple -Bundle-SymbolicName: com.googlecode.json-simple -Bundle-Version: 1.1.1 -Created-By: Apache Maven Bundle Plugin -Export-Package: org.json.simple;uses:="org.json.simple.parser";version=" - 1.1.1",org.json.simple.parser;uses:="org.json.simple";version="1.1.1" -Tool: Bnd-1.50.0 diff --git a/Interface/Interface/target/classes/META-INF/maven/com.googlecode.json-simple/json-simple/pom.properties b/Interface/Interface/target/classes/META-INF/maven/com.googlecode.json-simple/json-simple/pom.properties deleted file mode 100644 index deb18b7..0000000 --- a/Interface/Interface/target/classes/META-INF/maven/com.googlecode.json-simple/json-simple/pom.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Generated by org.apache.felix.bundleplugin -#Tue Mar 20 16:23:39 CST 2012 -version=1.1.1 -groupId=com.googlecode.json-simple -artifactId=json-simple diff --git a/Interface/Interface/target/classes/META-INF/maven/com.googlecode.json-simple/json-simple/pom.xml b/Interface/Interface/target/classes/META-INF/maven/com.googlecode.json-simple/json-simple/pom.xml deleted file mode 100644 index 62b931a..0000000 --- a/Interface/Interface/target/classes/META-INF/maven/com.googlecode.json-simple/json-simple/pom.xml +++ /dev/null @@ -1,110 +0,0 @@ -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>com.googlecode.json-simple</groupId> - <artifactId>json-simple</artifactId> - <packaging>bundle</packaging> - <name>JSON.simple</name> - <version>1.1.1</version> - <description>A simple Java toolkit for JSON</description> - <url>http://code.google.com/p/json-simple/</url> - <licenses> - <license> - <name>The Apache Software License, Version 2.0</name> - <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> - </license> - </licenses> - <developers> - <developer> - <id>Yidong</id> - <name>Yidong Fang</name> - <roles> - <role>architect</role> - <role>developer</role> - </roles> - <timezone>+8</timezone> - </developer> - </developers> - <scm> - <connection>scm:svn:http://json-simple.googlecode.com/svn/trunk/</connection> - <developerConnection>scm:svn:http://json-simple.googlecode.com/svn/trunk/</developerConnection> - <url>http://json-simple.googlecode.com/svn/trunk/</url> - </scm> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.10</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.6</version> - <extensions>true</extensions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.2</source> - <target>1.2</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-source-plugin</artifactId> - <version>2.1.2</version> - <executions> - <execution> - <id>attach-sources</id> - <phase>verify</phase> - <goals> - <goal>jar-no-fork</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>release-sign-artifacts</id> - <activation> - <property> - <name>performRelease</name> - <value>true</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-gpg-plugin</artifactId> - <version>1.4</version> - <executions> - <execution> - <id>sign-artifacts</id> - <phase>verify</phase> - <goals> - <goal>sign</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - -</project> - diff --git a/Interface/Interface/target/classes/org/json/simple/ItemList.class b/Interface/Interface/target/classes/org/json/simple/ItemList.class deleted file mode 100644 index c343cc8..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/ItemList.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/JSONArray.class b/Interface/Interface/target/classes/org/json/simple/JSONArray.class deleted file mode 100644 index 7c653c3..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/JSONArray.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/JSONAware.class b/Interface/Interface/target/classes/org/json/simple/JSONAware.class deleted file mode 100644 index bb0066d..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/JSONAware.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/JSONObject.class b/Interface/Interface/target/classes/org/json/simple/JSONObject.class deleted file mode 100644 index 6616143..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/JSONObject.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/JSONStreamAware.class b/Interface/Interface/target/classes/org/json/simple/JSONStreamAware.class deleted file mode 100644 index a77bcd9..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/JSONStreamAware.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/JSONValue.class b/Interface/Interface/target/classes/org/json/simple/JSONValue.class deleted file mode 100644 index 6aaaf9e..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/JSONValue.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/parser/ContainerFactory.class b/Interface/Interface/target/classes/org/json/simple/parser/ContainerFactory.class deleted file mode 100644 index 5f1f944..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/parser/ContainerFactory.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/parser/ContentHandler.class b/Interface/Interface/target/classes/org/json/simple/parser/ContentHandler.class deleted file mode 100644 index e194b95..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/parser/ContentHandler.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/parser/JSONParser.class b/Interface/Interface/target/classes/org/json/simple/parser/JSONParser.class deleted file mode 100644 index 358401e..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/parser/JSONParser.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/parser/ParseException.class b/Interface/Interface/target/classes/org/json/simple/parser/ParseException.class deleted file mode 100644 index c0373d3..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/parser/ParseException.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/parser/Yylex.class b/Interface/Interface/target/classes/org/json/simple/parser/Yylex.class deleted file mode 100644 index 2e54406..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/parser/Yylex.class and /dev/null differ diff --git a/Interface/Interface/target/classes/org/json/simple/parser/Yytoken.class b/Interface/Interface/target/classes/org/json/simple/parser/Yytoken.class deleted file mode 100644 index 6d7f4ff..0000000 Binary files a/Interface/Interface/target/classes/org/json/simple/parser/Yytoken.class and /dev/null differ diff --git a/Interface/Interface/target/classes/styles/BackgroundFriday.jpg b/Interface/Interface/target/classes/styles/BackgroundFriday.jpg deleted file mode 100644 index 07d16fc..0000000 Binary files a/Interface/Interface/target/classes/styles/BackgroundFriday.jpg and /dev/null differ diff --git a/Interface/Interface/target/classes/styles/Styles.css b/Interface/Interface/target/classes/styles/Styles.css deleted file mode 100644 index c7c7648..0000000 --- a/Interface/Interface/target/classes/styles/Styles.css +++ /dev/null @@ -1,4 +0,0 @@ -.bodybg{ - -fx-background-image: url('BackgroundFriday.jpg'); - -fx-background-size: 100% 100%; -} \ No newline at end of file diff --git a/Interface/Interface/target/dependency-maven-plugin-markers/com.googlecode.json-simple-json-simple-jar-1.1.1.marker b/Interface/Interface/target/dependency-maven-plugin-markers/com.googlecode.json-simple-json-simple-jar-1.1.1.marker deleted file mode 100644 index e69de29..0000000 diff --git a/Interface/Interface/target/maven-archiver/pom.properties b/Interface/Interface/target/maven-archiver/pom.properties deleted file mode 100644 index 8535fe0..0000000 --- a/Interface/Interface/target/maven-archiver/pom.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Generated by Maven -#Thu Jul 23 21:05:08 BRT 2020 -version=6.0 -groupId=FridayInterface -artifactId=Interface diff --git a/Interface/Interface/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/Interface/Interface/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst deleted file mode 100644 index 11366cc..0000000 --- a/Interface/Interface/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ /dev/null @@ -1,26 +0,0 @@ -FridayInterface\FXMLController$9.class -FridayInterface\FXMLController$2.class -FridayInterface\FXMLController$15.class -FridayInterface\FXMLController$4.class -FridayInterface\FXMLController$7.class -FridayInterface\FXMLController$6.class -FridayInterface\FXMLController$12.class -FridayInterface\FXMLController$21.class -FridayInterface\FXMLController$11.class -FridayInterface\FXMLController$17.class -FridayInterface\FXMLController$19.class -FridayInterface\ServerConnection.class -FridayInterface\FXMLController$1.class -FridayInterface\FXMLController$14.class -FridayInterface\FXMLController$3.class -FridayInterface\Configurations.class -FridayInterface\FXMLController$8.class -FridayInterface\FXMLController.class -FridayInterface\FXMLController$22.class -FridayInterface\FXMLController$16.class -FridayInterface\FXMLController$18.class -FridayInterface\MainApp.class -FridayInterface\FXMLController$13.class -FridayInterface\FXMLController$10.class -FridayInterface\FXMLController$20.class -FridayInterface\FXMLController$5.class diff --git a/Interface/Interface/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/Interface/Interface/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst deleted file mode 100644 index 58f46d4..0000000 --- a/Interface/Interface/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ /dev/null @@ -1,4 +0,0 @@ -e:\Sexta-Feira-Mark_6\Interface\Interface\src\main\java\FridayInterface\ServerConnection.java -e:\Sexta-Feira-Mark_6\Interface\Interface\src\main\java\FridayInterface\Configurations.java -e:\Sexta-Feira-Mark_6\Interface\Interface\src\main\java\FridayInterface\MainApp.java -e:\Sexta-Feira-Mark_6\Interface\Interface\src\main\java\FridayInterface\FXMLController.java diff --git a/Interface/Interface/nb-configuration.xml b/Interface/SextaFeiraInterface/nb-configuration.xml similarity index 100% rename from Interface/Interface/nb-configuration.xml rename to Interface/SextaFeiraInterface/nb-configuration.xml diff --git a/Interface/Interface/nbactions.xml b/Interface/SextaFeiraInterface/nbactions.xml similarity index 100% rename from Interface/Interface/nbactions.xml rename to Interface/SextaFeiraInterface/nbactions.xml diff --git a/Interface/Interface/pom.xml b/Interface/SextaFeiraInterface/pom.xml similarity index 92% rename from Interface/Interface/pom.xml rename to Interface/SextaFeiraInterface/pom.xml index 3ee0468..0fa4503 100644 --- a/Interface/Interface/pom.xml +++ b/Interface/SextaFeiraInterface/pom.xml @@ -2,16 +2,16 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>FridayInterface</groupId> - <artifactId>Interface</artifactId> + <groupId>Interface</groupId> + <artifactId>SextaFeiraInterface</artifactId> <version>6.0</version> <packaging>jar</packaging> - <name>Interface</name> + <name>SextaFeiraInterface</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <mainClass>FridayInterface.MainApp</mainClass> + <mainClass>Interface.MainApp</mainClass> </properties> <organization> @@ -105,12 +105,4 @@ </plugins> </build> - - <dependencies> - <dependency> - <groupId>com.googlecode.json-simple</groupId> - <artifactId>json-simple</artifactId> - <version>1.1.1</version> - </dependency> - </dependencies> </project> diff --git a/Interface/SextaFeiraInterface/src/main/FridayComunication.json b/Interface/SextaFeiraInterface/src/main/FridayComunication.json new file mode 100644 index 0000000..757b33f --- /dev/null +++ b/Interface/SextaFeiraInterface/src/main/FridayComunication.json @@ -0,0 +1,7 @@ +{ + "action": 1, + "content":{ + + }, + "url": ".com" +} \ No newline at end of file diff --git a/Interface/Interface/src/main/java/FridayInterface/Configurations.java b/Interface/SextaFeiraInterface/src/main/java/Interface/Configurations.java similarity index 97% rename from Interface/Interface/src/main/java/FridayInterface/Configurations.java rename to Interface/SextaFeiraInterface/src/main/java/Interface/Configurations.java index 00ffeef..9c7b204 100644 --- a/Interface/Interface/src/main/java/FridayInterface/Configurations.java +++ b/Interface/SextaFeiraInterface/src/main/java/Interface/Configurations.java @@ -1,4 +1,4 @@ -package FridayInterface; +package Interface; import java.io.FileReader; import java.io.IOException; diff --git a/Interface/Interface/src/main/java/FridayInterface/FXMLController.java b/Interface/SextaFeiraInterface/src/main/java/Interface/FXMLController.java similarity index 98% rename from Interface/Interface/src/main/java/FridayInterface/FXMLController.java rename to Interface/SextaFeiraInterface/src/main/java/Interface/FXMLController.java index 78ab207..a58eb6e 100644 --- a/Interface/Interface/src/main/java/FridayInterface/FXMLController.java +++ b/Interface/SextaFeiraInterface/src/main/java/Interface/FXMLController.java @@ -1,4 +1,4 @@ -package FridayInterface; +package Interface; import java.io.File; import java.lang.reflect.Array; @@ -113,11 +113,8 @@ public void handle(Event event) { } private void connectionLoop() { - - connection = new ServerConnection(); - response = (JSONObject) connection.receive("getDevicesStatus").get("Interface"); - - action = Integer.parseInt(response.get("action").toString()); + response = FridayComunication.readJsonFile(); + action = response.get("action"); switch (action) { case 0: @@ -443,3 +440,4 @@ private void setClock() { } + diff --git a/Interface/SextaFeiraInterface/src/main/java/Interface/FridayComunication.java b/Interface/SextaFeiraInterface/src/main/java/Interface/FridayComunication.java new file mode 100644 index 0000000..55525f5 --- /dev/null +++ b/Interface/SextaFeiraInterface/src/main/java/Interface/FridayComunication.java @@ -0,0 +1,18 @@ +package Interface; + +public class FridayComunication { + private static JSONObject jsonObject; + private static JSONParser parser; + + private static JSONObject readJsonFile() { + parser = new JSONParser(); + + try { + jsonObject = (JSONObject) parser.parse(new FileReader("E:\\Sexta-Feira-Mark_6\\Interface\\SextaFeiraInterface\\src\\main\\FridayComunication.json")); + } catch (ParseException | IOException e) { + e.printStackTrace(); + } + + return jsonObject; + } +} \ No newline at end of file diff --git a/Interface/Interface/src/main/java/FridayInterface/MainApp.java b/Interface/SextaFeiraInterface/src/main/java/Interface/MainApp.java similarity index 97% rename from Interface/Interface/src/main/java/FridayInterface/MainApp.java rename to Interface/SextaFeiraInterface/src/main/java/Interface/MainApp.java index 0527667..bf8cb14 100644 --- a/Interface/Interface/src/main/java/FridayInterface/MainApp.java +++ b/Interface/SextaFeiraInterface/src/main/java/Interface/MainApp.java @@ -1,4 +1,4 @@ -package FridayInterface; +package Interface; import javafx.application.Application; import static javafx.application.Application.launch; diff --git a/Interface/Interface/target/classes/fxml/Scene.fxml b/Interface/SextaFeiraInterface/src/main/resources/fxml/Scene.fxml similarity index 97% rename from Interface/Interface/target/classes/fxml/Scene.fxml rename to Interface/SextaFeiraInterface/src/main/resources/fxml/Scene.fxml index 894b687..d128a93 100644 --- a/Interface/Interface/target/classes/fxml/Scene.fxml +++ b/Interface/SextaFeiraInterface/src/main/resources/fxml/Scene.fxml @@ -8,7 +8,7 @@ <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> -<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="720.0" prefWidth="1280.0" styleClass="bodybg" stylesheets="@../styles/Styles.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="FridayInterface.FXMLController"> +<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="720.0" prefWidth="1280.0" styleClass="bodybg" stylesheets="@../styles/Styles.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Interface.FXMLController"> <children> <Label fx:id="lblTime" layoutX="120.0" layoutY="41.0" prefHeight="112.0" prefWidth="187.0" text="12:20" textFill="#ff6600" AnchorPane.leftAnchor="120.0" AnchorPane.topAnchor="41.0"> <font> diff --git a/Interface/Interface/src/main/resources/styles/BackgroundFriday.jpg b/Interface/SextaFeiraInterface/src/main/resources/styles/BackgroundFriday.jpg similarity index 100% rename from Interface/Interface/src/main/resources/styles/BackgroundFriday.jpg rename to Interface/SextaFeiraInterface/src/main/resources/styles/BackgroundFriday.jpg diff --git a/Interface/Interface/src/main/resources/styles/Styles.css b/Interface/SextaFeiraInterface/src/main/resources/styles/Styles.css similarity index 100% rename from Interface/Interface/src/main/resources/styles/Styles.css rename to Interface/SextaFeiraInterface/src/main/resources/styles/Styles.css diff --git a/Server/Server.py b/Server/Server.py index 38c7aff..90bebf2 100644 --- a/Server/Server.py +++ b/Server/Server.py @@ -68,6 +68,7 @@ def handle(self): if clientRequest['request'] == 'startFriday': os.startfile('E:\\Sexta-Feira-Mark_6\\Interface\\Interface\\target\\Interface-6.0.jar') + self.request.send(json.dumps({'requestStatus': True}).encode()) elif clientRequest['request'] == 'getDevices': device = convertList(dataBaseConnection.getDevices()) diff --git a/Sexta-Feira(A.I.)/Functions.py b/Sexta-Feira(A.I.)/Functions.py index c5f6754..00df714 100644 --- a/Sexta-Feira(A.I.)/Functions.py +++ b/Sexta-Feira(A.I.)/Functions.py @@ -3,6 +3,7 @@ from unicodedata import normalize from socket import socket, AF_INET, SOCK_STREAM from datetime import datetime +from threading import Thread def Recognition(): recognizer = sr.Recognizer() @@ -21,10 +22,19 @@ def Recognition(): except: return '' +class Speaker(Thread): + def __init__(self, text): + Thread.__init__(self) + self.text = text + + def run(self): + speaker = pyttsx3.init('sapi5') + speaker.say(self.text) + speaker.runAndWait() + def speak(text): - speaker = pyttsx3.init('sapi5') - speaker.say(text) - speaker.runAndWait() + speak = Speaker(text) + speak.start() def responseSelector(): return random.randint(4, 6) @@ -71,6 +81,9 @@ def setup(): else: speak('Boa noite chefe!') + devicesStatus = devicesStatusThread() + devicesStatus.start() + return [server, interactions] class ServerConnection: @@ -89,7 +102,17 @@ def send(self, message): return json.loads(self.connection.recv(5800).decode('utf-8')) +class devicesStatusThread(Thread): + def __init__(self): + Thread.__init__(self) + + def run(self): + server = ServerConnection() + while True: + response = server.send(setRequestJson('getDevicesStatus', 'server', 1, ".com")) + writeFile = open('E:/Sexta-Feira-Mark_6/Interface/Interface/FridayComunication.json', 'w') + json.dump(response['Interface'], writeFile, indent=4) diff --git a/Sexta-Feira(A.I.)/__pycache__/Functions.cpython-36.pyc b/Sexta-Feira(A.I.)/__pycache__/Functions.cpython-36.pyc index 6e8465c..6b6434d 100644 Binary files a/Sexta-Feira(A.I.)/__pycache__/Functions.cpython-36.pyc and b/Sexta-Feira(A.I.)/__pycache__/Functions.cpython-36.pyc differ