Browse Source

initial commit

master
Rino Grupp 8 months ago
commit
a570233e7a
117 changed files with 4550 additions and 0 deletions
  1. +25
    -0
      .classpath
  2. +24
    -0
      .gitignore
  3. +17
    -0
      .project
  4. +73
    -0
      build.xml
  5. +4
    -0
      build/built-jar.properties
  6. +0
    -0
      build/classes/.netbeans_automatic_build
  7. +0
    -0
      build/classes/.netbeans_update_resources
  8. BIN
      build/classes/bilderAuswahl/resources/image/Noimage.png
  9. BIN
      build/classes/bilderAuswahl/resources/image/accept.png
  10. BIN
      build/classes/bilderAuswahl/resources/image/decline.png
  11. BIN
      build/classes/bilderAuswahl/resources/image/eingang.png
  12. BIN
      build/classes/bilderAuswahl/resources/image/fehler.png
  13. BIN
      build/classes/bilderAuswahl/resources/image/instagram.png
  14. BIN
      build/classes/bilderAuswahl/resources/image/monitor.png
  15. BIN
      build/classes/bilderAuswahl/resources/image/pause.png
  16. BIN
      build/classes/bilderAuswahl/resources/image/rotateLeft.png
  17. BIN
      build/classes/bilderAuswahl/resources/image/rotateRight.png
  18. BIN
      build/classes/bilderAuswahl/resources/image/settings.png
  19. BIN
      build/classes/bilderAuswahl/resources/image/snapchat.png
  20. BIN
      build/classes/bilderAuswahl/resources/image/start.png
  21. BIN
      build/classes/bilderAuswahl/resources/image/whatsapp.png
  22. +15
    -0
      build/classes/bilderAuswahl/resources/properties.xml
  23. BIN
      build/classes/resources/image/NoImage.png
  24. BIN
      build/classes/resources/image/accept.png
  25. BIN
      build/classes/resources/image/decline.png
  26. BIN
      build/classes/resources/image/eingang.png
  27. BIN
      build/classes/resources/image/fehler.png
  28. BIN
      build/classes/resources/image/instagram.png
  29. BIN
      build/classes/resources/image/monitor.png
  30. BIN
      build/classes/resources/image/pause.png
  31. BIN
      build/classes/resources/image/rotateLeft.png
  32. BIN
      build/classes/resources/image/rotateRight.png
  33. BIN
      build/classes/resources/image/settings.png
  34. BIN
      build/classes/resources/image/snapchat.png
  35. BIN
      build/classes/resources/image/start.png
  36. BIN
      build/classes/resources/image/whatsapp.png
  37. +15
    -0
      build/classes/resources/properties.xml
  38. +3
    -0
      build/classes/todo
  39. +32
    -0
      dist/README.TXT
  40. +3
    -0
      manifest.mf
  41. +1420
    -0
      nbproject/build-impl.xml
  42. +8
    -0
      nbproject/genfiles.properties
  43. +0
    -0
      nbproject/private/config.properties
  44. +11
    -0
      nbproject/private/private (DESKTOP-V7EHUBAs in Konflikt stehende Kopie 2017-01-18).xml
  45. +14
    -0
      nbproject/private/private.properties
  46. +7
    -0
      nbproject/private/private.xml
  47. +92
    -0
      nbproject/project.properties
  48. +15
    -0
      nbproject/project.xml
  49. BIN
      resources/image/Noimage.png
  50. BIN
      resources/image/accept.png
  51. BIN
      resources/image/decline.png
  52. BIN
      resources/image/eingang.png
  53. BIN
      resources/image/fehler.png
  54. BIN
      resources/image/instagram.png
  55. BIN
      resources/image/monitor.png
  56. BIN
      resources/image/pause.png
  57. BIN
      resources/image/rotateLeft.png
  58. BIN
      resources/image/rotateRight.png
  59. BIN
      resources/image/settings.png
  60. BIN
      resources/image/snapchat.png
  61. BIN
      resources/image/start.png
  62. BIN
      resources/image/whatsapp.png
  63. +15
    -0
      resources/properties.xml
  64. +111
    -0
      src/Bildquellen/InstagramBilder.java
  65. +98
    -0
      src/Bildquellen/SnapchatBilder.java
  66. +99
    -0
      src/Bildquellen/WhatsappBilder.java
  67. +229
    -0
      src/Diashow/AnzeigeDiashow.java
  68. +105
    -0
      src/Diashow/DiashowVerwaltung.java
  69. +35
    -0
      src/Server/AcceptHandler.java
  70. +46
    -0
      src/Server/CountHandler.java
  71. +35
    -0
      src/Server/DeclineHandler.java
  72. +72
    -0
      src/Server/ImageHandler.java
  73. +57
    -0
      src/Server/Server.java
  74. +71
    -0
      src/ThreadSucheLinks.java
  75. +97
    -0
      src/UeberwacheDatei.java
  76. +52
    -0
      src/appium/AppiumServer.java
  77. +79
    -0
      src/appium/Connector.java
  78. +49
    -0
      src/appium/Driver.java
  79. +235
    -0
      src/bilderAuswahl/AnzeigeAuswahlbild.java
  80. +100
    -0
      src/bilderAuswahl/Archiv.java
  81. +35
    -0
      src/bilderAuswahl/ThreadBilderAuswahl.java
  82. BIN
      src/bilderAuswahl/resources/image/Noimage.png
  83. BIN
      src/bilderAuswahl/resources/image/accept.png
  84. BIN
      src/bilderAuswahl/resources/image/decline.png
  85. BIN
      src/bilderAuswahl/resources/image/eingang.png
  86. BIN
      src/bilderAuswahl/resources/image/fehler.png
  87. BIN
      src/bilderAuswahl/resources/image/instagram.png
  88. BIN
      src/bilderAuswahl/resources/image/monitor.png
  89. BIN
      src/bilderAuswahl/resources/image/pause.png
  90. BIN
      src/bilderAuswahl/resources/image/rotateLeft.png
  91. BIN
      src/bilderAuswahl/resources/image/rotateRight.png
  92. BIN
      src/bilderAuswahl/resources/image/settings.png
  93. BIN
      src/bilderAuswahl/resources/image/snapchat.png
  94. BIN
      src/bilderAuswahl/resources/image/start.png
  95. BIN
      src/bilderAuswahl/resources/image/whatsapp.png
  96. +15
    -0
      src/bilderAuswahl/resources/properties.xml
  97. +858
    -0
      src/ffeststeuerungneu/Anzeige.java
  98. +137
    -0
      src/ffeststeuerungneu/Log.java
  99. +47
    -0
      src/ffeststeuerungneu/Props.java
  100. +77
    -0
      src/ffeststeuerungneu/frame.java

+ 25
- 0
.classpath View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="dist/ffeststeuerungNeu.jar"/>
<classpathentry exported="true" kind="lib" path="jars/client-combined-3.10.0.jar"/>
<classpathentry exported="true" kind="lib" path="jars/commons-lang3-3.7-javadoc.jar"/>
<classpathentry exported="true" kind="lib" path="jars/commons-lang3-3.7.jar"/>
<classpathentry exported="true" kind="lib" path="jars/commons-validator-1.6-javadoc.jar"/>
<classpathentry exported="true" kind="lib" path="jars/commons-validator-1.6-sources.jar"/>
<classpathentry exported="true" kind="lib" path="jars/commons-validator-1.6.jar"/>
<classpathentry exported="true" kind="lib" path="jars/gson-2.6.2.jar"/>
<classpathentry exported="true" kind="lib" path="jars/java-client-6.0.0-BETA3-javadoc.jar"/>
<classpathentry exported="true" kind="lib" path="jars/java-client-6.0.0-BETA3.jar"/>
<classpathentry exported="true" kind="lib" path="jars/selenium-server-standalone-3.10.0.jar"/>
<classpathentry exported="true" kind="lib" path="resources/jars/synthetica.jar"/>
<classpathentry exported="true" kind="lib" path="resources/jars/synthetica1.jar"/>
<classpathentry exported="true" kind="lib" path="resources/jars/syntheticaPlain.jar"/>
<classpathentry exported="true" kind="lib" path="resources/jars/weblaf-complete-1.28.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>

+ 24
- 0
.gitignore View File

@ -0,0 +1,24 @@
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

+ 17
- 0
.project View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ffeststeuerungNeu</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

+ 73
- 0
build.xml View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="ffeststeuerungNeu" default="default" basedir=".">
<description>Builds, tests, and runs the project ffeststeuerungNeu.</description>
<import file="nbproject/build-impl.xml"/>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar: JAR building
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="ffeststeuerungNeu-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
</project>

+ 4
- 0
build/built-jar.properties View File

@ -0,0 +1,4 @@
#Sun, 08 Jan 2023 21:48:27 +0100
D\:\\Dropbox\\ffeststeuerungNeu=

+ 0
- 0
build/classes/.netbeans_automatic_build View File


+ 0
- 0
build/classes/.netbeans_update_resources View File


BIN
build/classes/bilderAuswahl/resources/image/Noimage.png View File

Before After
Width: 1152  |  Height: 648  |  Size: 9.1 KiB

BIN
build/classes/bilderAuswahl/resources/image/accept.png View File

Before After
Width: 512  |  Height: 512  |  Size: 7.5 KiB

BIN
build/classes/bilderAuswahl/resources/image/decline.png View File

Before After
Width: 2400  |  Height: 2400  |  Size: 16 KiB

BIN
build/classes/bilderAuswahl/resources/image/eingang.png View File

Before After
Width: 224  |  Height: 225  |  Size: 900 B

BIN
build/classes/bilderAuswahl/resources/image/fehler.png View File

Before After
Width: 210  |  Height: 210  |  Size: 3.6 KiB

BIN
build/classes/bilderAuswahl/resources/image/instagram.png View File

Before After
Width: 599  |  Height: 600  |  Size: 178 KiB

BIN
build/classes/bilderAuswahl/resources/image/monitor.png View File

Before After
Width: 512  |  Height: 512  |  Size: 6.1 KiB

BIN
build/classes/bilderAuswahl/resources/image/pause.png View File

Before After
Width: 128  |  Height: 128  |  Size: 2.8 KiB

BIN
build/classes/bilderAuswahl/resources/image/rotateLeft.png View File

Before After
Width: 128  |  Height: 128  |  Size: 1.3 KiB

BIN
build/classes/bilderAuswahl/resources/image/rotateRight.png View File

Before After
Width: 128  |  Height: 128  |  Size: 1.4 KiB

BIN
build/classes/bilderAuswahl/resources/image/settings.png View File

Before After
Width: 512  |  Height: 512  |  Size: 9.6 KiB

BIN
build/classes/bilderAuswahl/resources/image/snapchat.png View File

Before After
Width: 84  |  Height: 84  |  Size: 1.6 KiB

BIN
build/classes/bilderAuswahl/resources/image/start.png View File

Before After
Width: 128  |  Height: 128  |  Size: 6.9 KiB

BIN
build/classes/bilderAuswahl/resources/image/whatsapp.png View File

Before After
Width: 1034  |  Height: 1034  |  Size: 60 KiB

+ 15
- 0
build/classes/bilderAuswahl/resources/properties.xml View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Speicherorte</comment>
<entry key="snapchat">C:\ffestData\snapchat</entry>
<entry key="whatsapp">C:\ffestData\whatsapp</entry>
<entry key="instagram">C:\ffestData\instagram\4K Stogram\frühling_tag</entry>
<entry key="ffestData">C:\ffestData\</entry>
<entry key="resources">/resources/image/</entry>
<entry key="whatsappnummer">015259079638</entry>
<entry key="instagramtag">#frühling</entry>
<entry key="snapchatname">mv_owennnn</entry>
<entry key="fullscreen">no</entry>
<entry key="screen">1</entry>
</properties>

BIN
build/classes/resources/image/NoImage.png View File

Before After
Width: 1152  |  Height: 648  |  Size: 9.1 KiB

BIN
build/classes/resources/image/accept.png View File

Before After
Width: 512  |  Height: 512  |  Size: 7.5 KiB

BIN
build/classes/resources/image/decline.png View File

Before After
Width: 2400  |  Height: 2400  |  Size: 16 KiB

BIN
build/classes/resources/image/eingang.png View File

Before After
Width: 224  |  Height: 225  |  Size: 900 B

BIN
build/classes/resources/image/fehler.png View File

Before After
Width: 210  |  Height: 210  |  Size: 3.6 KiB

BIN
build/classes/resources/image/instagram.png View File

Before After
Width: 599  |  Height: 600  |  Size: 178 KiB

BIN
build/classes/resources/image/monitor.png View File

Before After
Width: 512  |  Height: 512  |  Size: 6.1 KiB

BIN
build/classes/resources/image/pause.png View File

Before After
Width: 128  |  Height: 128  |  Size: 2.8 KiB

BIN
build/classes/resources/image/rotateLeft.png View File

Before After
Width: 128  |  Height: 128  |  Size: 1.3 KiB

BIN
build/classes/resources/image/rotateRight.png View File

Before After
Width: 128  |  Height: 128  |  Size: 1.4 KiB

BIN
build/classes/resources/image/settings.png View File

Before After
Width: 512  |  Height: 512  |  Size: 9.6 KiB

BIN
build/classes/resources/image/snapchat.png View File

Before After
Width: 84  |  Height: 84  |  Size: 1.6 KiB

BIN
build/classes/resources/image/start.png View File

Before After
Width: 128  |  Height: 128  |  Size: 6.9 KiB

BIN
build/classes/resources/image/whatsapp.png View File

Before After
Width: 1034  |  Height: 1034  |  Size: 60 KiB

+ 15
- 0
build/classes/resources/properties.xml View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Speicherorte</comment>
<entry key="snapchat">C:\ffestData\snapchat</entry>
<entry key="whatsapp">C:\ffestData\whatsappBusiness</entry>
<entry key="instagram">C:\ffestData\instagram\4K Stogram\frühling_tag</entry>
<entry key="ffestData">C:\ffestData\</entry>
<entry key="resources">resources/image/</entry>
<entry key="whatsappnummer">015259079638</entry>
<entry key="instagramtag">#frühling</entry>
<entry key="snapchatname">mv_owennnn</entry>
<entry key="fullscreen">no</entry>
<entry key="screen">0</entry>
</properties>

+ 3
- 0
build/classes/todo View File

@ -0,0 +1,3 @@
//synchronized testen
Bildanzahl einstellbar
bilddaauer anfangs setzen

+ 32
- 0
dist/README.TXT View File

@ -0,0 +1,32 @@
========================
BUILD OUTPUT DESCRIPTION
========================
When you build an Java application project that has a main class, the IDE
automatically copies all of the JAR
files on the projects classpath to your projects dist/lib folder. The IDE
also adds each of the JAR files to the Class-Path element in the application
JAR files manifest file (MANIFEST.MF).
To run the project from the command line, go to the dist folder and
type the following:
java -jar "ffeststeuerungNeu.jar"
To distribute this project, zip up the dist folder (including the lib folder)
and distribute the ZIP file.
Notes:
* If two JAR files on the project classpath have the same name, only the first
JAR file is copied to the lib folder.
* Only JAR files are copied to the lib folder.
If the classpath contains other types of files or folders, these files (folders)
are not copied.
* If a library on the projects classpath also has a Class-Path element
specified in the manifest,the content of the Class-Path element has to be on
the projects runtime path.
* To set a main class in a standard Java project, right-click the project node
in the Projects window and choose Properties. Then click Run and enter the
class name in the Main Class field. Alternatively, you can manually type the
class name in the manifest Main-Class element.

+ 3
- 0
manifest.mf View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build

+ 1420
- 0
nbproject/build-impl.xml
File diff suppressed because it is too large
View File


+ 8
- 0
nbproject/genfiles.properties View File

@ -0,0 +1,8 @@
build.xml.data.CRC32=3704fc3c
build.xml.script.CRC32=080de010
build.xml.stylesheet.CRC32=8064a381@1.80.1.48
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=3704fc3c
nbproject/build-impl.xml.script.CRC32=8912f73d
nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48

+ 0
- 0
nbproject/private/config.properties View File


+ 11
- 0
nbproject/private/private (DESKTOP-V7EHUBAs in Konflikt stehende Kopie 2017-01-18).xml View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/D:/Dropbox/ffeststeuerungNeu/src/Diashow/DiashowVerwaltung.java</file>
<file>file:/D:/Dropbox/ffeststeuerungNeu/src/ffeststeuerungneu/props.java</file>
<file>file:/D:/Dropbox/ffeststeuerungNeu/src/Diashow/AnzeigeDiashow.java</file>
</group>
</open-files>
</project-private>

+ 14
- 0
nbproject/private/private.properties View File

@ -0,0 +1,14 @@
compile.on.save=true
do.depend=false
do.jar=true
file.reference.client-combined-3.10.0.jar=D:\\Dropbox\\ffeststeuerungNeu\\jars\\client-combined-3.10.0.jar
file.reference.commons-lang3-3.7-javadoc.jar=D:\\Dropbox\\ffeststeuerungNeu\\jars\\commons-lang3-3.7-javadoc.jar
file.reference.commons-lang3-3.7.jar=D:\\Dropbox\\ffeststeuerungNeu\\jars\\commons-lang3-3.7.jar
file.reference.commons-validator-1.6.jar=D:\\Dropbox\\ffeststeuerungNeu\\jars\\commons-validator-1.6.jar
file.reference.gson-2.6.2.jar=D:\\Dropbox\\ffeststeuerungNeu\\jars\\gson-2.6.2.jar
file.reference.java-client-6.0.0-BETA3-javadoc.jar=D:\\Dropbox\\ffeststeuerungNeu\\jars\\java-client-6.0.0-BETA3-javadoc.jar
file.reference.java-client-6.0.0-BETA3.jar=D:\\Dropbox\\ffeststeuerungNeu\\jars\\java-client-6.0.0-BETA3.jar
file.reference.selenium-server-standalone-3.10.0.jar=D:\\Dropbox\\ffeststeuerungNeu\\jars\\selenium-server-standalone-3.10.0.jar
javac.debug=true
javadoc.preview=true
user.properties.file=C:\\Users\\Rino\\AppData\\Roaming\\NetBeans\\8.2\\build.properties

+ 7
- 0
nbproject/private/private.xml View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group/>
</open-files>
</project-private>

+ 92
- 0
nbproject/project.properties View File

@ -0,0 +1,92 @@
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=ffeststeuerungNeu
application.vendor=Rino
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# Files in build.classes.dir which should be excluded from distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/ffeststeuerungNeu.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.client-combined-3.10.0.jar=D:\\Dropbox\\Appium\\jars\\client-combined-3.10.0.jar
file.reference.commons-lang3-3.7-javadoc.jar=D:\\Dropbox\\Appium\\jars\\commons-lang3-3.7-javadoc.jar
file.reference.commons-lang3-3.7.jar=D:\\Dropbox\\Appium\\jars\\commons-lang3-3.7.jar
file.reference.commons-validator-1.6.jar=D:\\Dropbox\\Appium\\jars\\commons-validator-1.6.jar
file.reference.gson-2.6.2.jar=D:\\Dropbox\\Appium\\jars\\gson-2.6.2.jar
file.reference.java-client-6.0.0-BETA3-javadoc.jar=D:\\Dropbox\\Appium\\jars\\java-client-6.0.0-BETA3-javadoc.jar
file.reference.java-client-6.0.0-BETA3.jar=D:\\Dropbox\\Appium\\jars\\java-client-6.0.0-BETA3.jar
file.reference.selenium-server-standalone-3.10.0.jar=D:\\Dropbox\\Appium\\jars\\selenium-server-standalone-3.10.0.jar
includes=**
jar.compress=false
javac.classpath=\
${file.reference.client-combined-3.10.0.jar}:\
${file.reference.commons-lang3-3.7-javadoc.jar}:\
${file.reference.commons-lang3-3.7.jar}:\
${file.reference.commons-validator-1.6.jar}:\
${file.reference.gson-2.6.2.jar}:\
${file.reference.java-client-6.0.0-BETA3-javadoc.jar}:\
${file.reference.java-client-6.0.0-BETA3.jar}:\
${file.reference.selenium-server-standalone-3.10.0.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.external.vm=true
javac.processorpath=\
${javac.classpath}
javac.source=1.8
javac.target=1.8
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=ffeststeuerungneu.frame
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.src.dir=src
test.src.dir=test

+ 15
- 0
nbproject/project.xml View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.java.j2seproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
<name>ffeststeuerungNeu</name>
<source-roots>
<root id="src.src.dir"/>
</source-roots>
<test-roots>
<root id="test.src.dir"/>
</test-roots>
</data>
</configuration>
</project>

BIN
resources/image/Noimage.png View File

Before After
Width: 1152  |  Height: 648  |  Size: 9.1 KiB

BIN
resources/image/accept.png View File

Before After
Width: 512  |  Height: 512  |  Size: 7.5 KiB

BIN
resources/image/decline.png View File

Before After
Width: 2400  |  Height: 2400  |  Size: 16 KiB

BIN
resources/image/eingang.png View File

Before After
Width: 224  |  Height: 225  |  Size: 900 B

BIN
resources/image/fehler.png View File

Before After
Width: 210  |  Height: 210  |  Size: 3.6 KiB

BIN
resources/image/instagram.png View File

Before After
Width: 599  |  Height: 600  |  Size: 178 KiB

BIN
resources/image/monitor.png View File

Before After
Width: 512  |  Height: 512  |  Size: 6.1 KiB

BIN
resources/image/pause.png View File

Before After
Width: 128  |  Height: 128  |  Size: 2.8 KiB

BIN
resources/image/rotateLeft.png View File

Before After
Width: 128  |  Height: 128  |  Size: 1.3 KiB

BIN
resources/image/rotateRight.png View File

Before After
Width: 128  |  Height: 128  |  Size: 1.4 KiB

BIN
resources/image/settings.png View File

Before After
Width: 512  |  Height: 512  |  Size: 9.6 KiB

BIN
resources/image/snapchat.png View File

Before After
Width: 84  |  Height: 84  |  Size: 1.6 KiB

BIN
resources/image/start.png View File

Before After
Width: 128  |  Height: 128  |  Size: 6.9 KiB

BIN
resources/image/whatsapp.png View File

Before After
Width: 1034  |  Height: 1034  |  Size: 60 KiB

+ 15
- 0
resources/properties.xml View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Speicherorte</comment>
<entry key="snapchat">C:\ffestData\snapchat</entry>
<entry key="whatsapp">C:\ffestData\whatsappBusiness</entry>
<entry key="instagram">C:\ffestData\instagram\4K Stogram\frühling_tag</entry>
<entry key="ffestData">C:\ffestData\</entry>
<entry key="resources">resources/image/</entry>
<entry key="whatsappnummer">015259079638</entry>
<entry key="instagramtag">#frühling</entry>
<entry key="snapchatname">mv_owennnn</entry>
<entry key="fullscreen">no</entry>
<entry key="screen">1</entry>
</properties>

+ 111
- 0
src/Bildquellen/InstagramBilder.java View File

@ -0,0 +1,111 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Bildquellen;
import bilderAuswahl.ThreadBilderAuswahl;
import ffeststeuerungneu.Log;
import java.io.File;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.Paths;
import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
import java.nio.file.WatchEvent;
import java.nio.file.WatchKey;
import java.nio.file.WatchService;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Rino
*/
public class InstagramBilder extends Thread {
int i = 0;
private ThreadBilderAuswahl tba;
private WatchService watcher;
private String INSTAGRAM; // = "C:\\ffestData\\instagram\\4K Stogram\\mvö_tag";
private boolean runnable = true;
public InstagramBilder(ThreadBilderAuswahl tba, String pfad) {
INSTAGRAM = pfad;
this.tba = tba;
// tba.neuesBild("C:\\ffestData\\instagram\\4k stogram\\tag_mvö\\1.jpg");
// tba.neuesBild("C:\\ffestData\\instagram\\4k stogram\\tag_mvö\\2.jpg");
// tba.neuesBild("C:\\ffestData\\instagram\\4k stogram\\tag_mvö\\3.jpg");
// tba.neuesBild("C:\\ffestData\\instagram\\4k stogram\\tag_mvö\\4.jpg");
try {
watcher = FileSystems.getDefault().newWatchService();
Path dir = Paths.get(INSTAGRAM);
dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
} catch (IOException ex) {
Logger.getLogger(Bildquellen.InstagramBilder.class.getName()).log(Level.SEVERE, null, ex);
Log.setError(ex, "Class: InstagramBilder. Directory not found.");
}
}
@Override
public void run() {
while (runnable) {
WatchKey key;
try {
// wait for a key to be available
key = watcher.take();
} catch (InterruptedException ex) {
Log.setError(ex, "Class: InstagramBilder Interrupt of Thread");
return;
}
for (WatchEvent<?> event : key.pollEvents()) {
// get event type
WatchEvent.Kind<?> kind = event.kind();
// get file name
@SuppressWarnings("unchecked")
WatchEvent<Path> ev = (WatchEvent<Path>) event;
Path fileName = ev.context();
i++;
if (fileName.toString().endsWith("jpg") && kind.equals(ENTRY_CREATE)) {
tba.neuesBild(INSTAGRAM + "\\" + fileName.toString());
Log.incInstagram();
Log.setInfo("Image detectet: Instagram");
}
if (kind == ENTRY_CREATE) {
// process create event
} else if (kind == ENTRY_DELETE) {
// process delete event
} else if (kind == ENTRY_MODIFY) {
// process modify event
}
}
// IMPORTANT: The key must be reset after processed
boolean valid = key.reset();
if (!valid) {
break;
}
}
}
public void terminate(){
runnable = false;
}
}

+ 98
- 0
src/Bildquellen/SnapchatBilder.java View File

@ -0,0 +1,98 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Bildquellen;
import bilderAuswahl.ThreadBilderAuswahl;
import ffeststeuerungneu.Log;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.Paths;
import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
import java.nio.file.WatchEvent;
import java.nio.file.WatchKey;
import java.nio.file.WatchService;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Rino
*/
public class SnapchatBilder extends Thread{
private ThreadBilderAuswahl tba;
private WatchService watcher;
private String SNAPCHAT; // = "C:\\ffestData\\instagram\\4K Stogram\\mvö_tag";
private boolean runnable =true;
public SnapchatBilder(ThreadBilderAuswahl tba, String pfad) {
SNAPCHAT = pfad;
this.tba = tba;
try {
watcher = FileSystems.getDefault().newWatchService();
Path dir = Paths.get(SNAPCHAT);
dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
} catch (IOException ex) {
Logger.getLogger(Bildquellen.InstagramBilder.class.getName()).log(Level.SEVERE, null, ex);
Log.setError(ex, "Class: InstagramBilder. File not found");
}
}
@Override
public void run() {
while (!isInterrupted()) {
WatchKey key;
try {
// wait for a key to be available
key = watcher.take();
} catch (InterruptedException ex) {
Log.setError(ex, "Class: InstagramBilder Interrupt of Thread");
return;
}
for (WatchEvent<?> event : key.pollEvents()) {
// get event type
WatchEvent.Kind<?> kind = event.kind();
// get file name
@SuppressWarnings("unchecked")
WatchEvent<Path> ev = (WatchEvent<Path>) event;
Path fileName = ev.context();
if (fileName.toString().endsWith("jpg") && kind.equals(ENTRY_CREATE)) {
Log.incSnapchat();
tba.neuesBild(SNAPCHAT + "\\" + fileName.toString());
Log.setInfo("Image detected: Snapchat");
}
if (kind == ENTRY_CREATE) {
// process create event
} else if (kind == ENTRY_DELETE) {
// process delete event
} else if (kind == ENTRY_MODIFY) {
// process modify event
}
}
// IMPORTANT: The key must be reset after processed
boolean valid = key.reset();
if (!valid) {
break;
}
}
}
public void terminate(){
runnable = false;
}
}

+ 99
- 0
src/Bildquellen/WhatsappBilder.java View File

@ -0,0 +1,99 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Bildquellen;
import bilderAuswahl.ThreadBilderAuswahl;
import ffeststeuerungneu.Log;
import java.io.IOException;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.Paths;
import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
import java.nio.file.WatchEvent;
import java.nio.file.WatchKey;
import java.nio.file.WatchService;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Rino
*/
public class WhatsappBilder extends Thread{
private ThreadBilderAuswahl tba;
private WatchService watcher;
private String WHATSAPP; // = "C:\\ffestData\\instagram\\4K Stogram\\mvö_tag";
private boolean runnable =true;
public WhatsappBilder(ThreadBilderAuswahl tba, String pfad) {
WHATSAPP = pfad;
this.tba = tba;
try {
watcher = FileSystems.getDefault().newWatchService();
Path dir = Paths.get(WHATSAPP);
System.out.println(dir.toString());
dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
} catch (IOException ex) {
Logger.getLogger(Bildquellen.WhatsappBilder.class.getName()).log(Level.SEVERE, null, ex);
Log.setError(ex, "Class: WhatsappBilder. File not found");
}
}
@Override
public void run() {
while (!isInterrupted()) {
WatchKey key;
try {
// wait for a key to be available
key = watcher.take();
} catch (InterruptedException ex) {
Log.setError(ex, "Class: WhatsappBilder Interrupt of Thread");
return;
}
for (WatchEvent<?> event : key.pollEvents()) {
// get event type
WatchEvent.Kind<?> kind = event.kind();
// get file name
@SuppressWarnings("unchecked")
WatchEvent<Path> ev = (WatchEvent<Path>) event;
Path fileName = ev.context();
if (fileName.toString().endsWith("jpg") && kind.equals(ENTRY_CREATE)) {
Log.incWhatsapp();
tba.neuesBild(WHATSAPP + "\\" + fileName.toString());
Log.setInfo("Image detected: Whatsapp");
}
if (kind == ENTRY_CREATE) {
// process create event
} else if (kind == ENTRY_DELETE) {
// process delete event
} else if (kind == ENTRY_MODIFY) {
// process modify event
}
}
// IMPORTANT: The key must be reset after processed
boolean valid = key.reset();
if (!valid) {
break;
}
}
}
public void terminate(){
runnable = false;
}
}

+ 229
- 0
src/Diashow/AnzeigeDiashow.java View File

@ -0,0 +1,229 @@
package Diashow;
import ffeststeuerungneu.Props;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.Timer;
public class AnzeigeDiashow extends JPanel {
/**
* Creates new form PDiashow
*/
private int anzahlBilder = 20;
private int neueBilderArray = 0;
private int bildNr = 0;
private static final int INSTAGRAM = 0;
private static final int SNAPCHAT = 1;
private static final int WHATSAPP = 2;
private Timer t;
private final ImageIcon icon[] = new ImageIcon[3];
private BufferedImage bim[] = new BufferedImage[anzahlBilder];
private BufferedImage neueBilder[] = new BufferedImage[99];
private final Props p;
private final String pfad;
private boolean pause = false, fertig = false;
private double fx, fy;
private int width, height;
public AnzeigeDiashow() {
p = new Props();
pfad = p.getInfo("resources");
initIcon();
initComponents();
fertig = true;
}
private void initIcon() {
icon[INSTAGRAM] = new ImageIcon(pfad + "instagram.png");
icon[SNAPCHAT] = new ImageIcon(pfad + "snapchat.png");
icon[WHATSAPP] = new ImageIcon(pfad + "whatsapp.png");
for (int j = 0; j < icon.length; j++) {
icon[j].setImage(icon[j].getImage().getScaledInstance(100, 100, Image.SCALE_DEFAULT));
}
}
@Override
public void paintComponent(Graphics g) {
width = this.getWidth();
height = this.getHeight() - this.panelText.getHeight();
// this.setPreferredSize(new Dimension(200,400));
g.setColor(Color.black);
g.fillRect(0, 0, this.getWidth(), this.getHeight() + 40);
if (bim[bildNr] != null && fertig) {
fx = ((double) width / bim[bildNr].getWidth());
fy = ((double) height / bim[bildNr].getHeight());
if (pause) {
} else if (fx > fy) {
g.drawImage(bim[bildNr],
(int) ((width - (bim[bildNr].getWidth() * fy)) / 2),
(int) ((height - (bim[bildNr].getHeight() * fy)) / 2) + this.panelText.getHeight(),
(int) (bim[bildNr].getWidth() * fy),
(int) (bim[bildNr].getHeight() * fy), panelBild);
} else {
g.drawImage(bim[bildNr],
(int) ((width - (bim[bildNr].getWidth() * fx)) / 2),
(int) ((height - (bim[bildNr].getHeight() * fx)) / 2),
(int) (bim[bildNr].getWidth() * fx),
(int) (bim[bildNr].getHeight() * fx), panelBild);
}
}
}
private void naechstesBild() {
bildNr++;
if (bildNr >= anzahlBilder || bim[bildNr] == null) {
bilderEinfuegen();
bildNr = 0;
}
super.repaint();
}
public void bilderEinfuegen() {
for (int i = 0; i < neueBilderArray; i++) {
for (int j = bim.length - 1; j > 0; j--) {
bim[j] = bim[j - 1];
}
bim[0] = neueBilder[i];
}
neueBilderArray = 0;
}
public void neuesBild(BufferedImage nbim) {
neueBilder[neueBilderArray] = nbim;
neueBilderArray++;
}
public void stop() {
t.stop();
}
public void pause() {
pause = !pause;
repaint();
}
public void start() {
t = new Timer(1000, new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
if (!pause) {
naechstesBild();
}
}
});
t.start();
}
public void setSek(int sec) {
t.setDelay(sec * 1000);
t.restart();
}
public void setAnzahlBilder(int a) {
anzahlBilder = a;
}
public void weiter() {
naechstesBild();
}
public void setAnzahl(int a) {
anzahlBilder = a;
}
private void initComponents() {
initText();
//
panelText = new JPanel();
panelText.setBackground(Color.black);
panelText.add(labelInstagram);
panelText.add(new JLabel(" "));
panelText.add(labelSnapchat);
panelText.add(new JLabel(" "));
panelText.add(labelWhatsapp);
this.setLayout(new BorderLayout());
//
this.add(panelText, BorderLayout.NORTH);
}
private void initText() {
labelWhatsapp = new JLabel(p.getInfo("whatsappnummer"));
labelSnapchat = new JLabel(p.getInfo("snapchatname"));
labelInstagram = new JLabel(p.getInfo("instagramtag"));
labelWhatsapp.setIcon(icon[WHATSAPP]);
labelSnapchat.setIcon(icon[SNAPCHAT]);
labelInstagram.setIcon(icon[INSTAGRAM]);
labelSnapchat.setForeground(Color.white);
labelInstagram.setForeground(Color.white);
labelWhatsapp.setForeground(Color.white);
labelSnapchat.setFont(new java.awt.Font("Tahoma", 1, 48));
labelInstagram.setFont(new java.awt.Font("Tahoma", 1, 48));
labelWhatsapp.setFont(new java.awt.Font("Tahoma", 1, 48));
labelWhatsapp.setVisible(false);
labelInstagram.setVisible(false);
labelSnapchat.setVisible(false);
}
public void setOnline(int what, boolean online) {
switch (what) {
case SNAPCHAT:
labelSnapchat.setVisible(online);
break;
case INSTAGRAM:
labelInstagram.setVisible(online);
break;
case WHATSAPP:
labelWhatsapp.setVisible(online);
break;
}
}
private JPanel panelText;
private JPanel panelBild;
private JLabel labelWhatsapp;
private JLabel labelInstagram;
private JLabel labelSnapchat;
}

+ 105
- 0
src/Diashow/DiashowVerwaltung.java View File

@ -0,0 +1,105 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Diashow;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import javax.swing.JFrame;
import javax.swing.JPanel;
/**
*
* @author Rino
*/
public class DiashowVerwaltung {
private final AnzeigeDiashow dia;
private final JFrame diaframe;
public DiashowVerwaltung(int anzeige) {
diaframe = new JFrame();
dia = new AnzeigeDiashow();
diaframe.getContentPane().setBackground(Color.yellow);
// dia.setBackground(Color.red);
switch (anzeige) {
case 0:
diaframe.setUndecorated(true);
GraphicsDevice[] graphicsDevices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
for (GraphicsDevice d : graphicsDevices) {
Rectangle deviceBounds = d.getDefaultConfiguration().getBounds();
diaframe.setBounds((int) deviceBounds.getX(), (int) deviceBounds.getY(), (int) deviceBounds.getWidth(), (int) deviceBounds.getHeight());
diaframe.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
diaframe.add(dia);
diaframe.setVisible(true);
}
break;
case 1:
diaframe.add(dia);
diaframe.setVisible(true);
diaframe.setSize(400, 600);
dia.setPreferredSize(new Dimension(diaframe.getWidth(), diaframe.getHeight()));
dia.setSize(new Dimension(diaframe.getWidth(), diaframe.getHeight()));
break;
case 2:
break;
}
}
public void setOnline(int what, boolean online) {
dia.setOnline(what, online);
}
public void start() {
dia.start();
}
public void pause() {
dia.pause();
}
public void neuesBild(BufferedImage bim) {
dia.neuesBild(bim);
}
public void setTime(int t) {
dia.setSek(t);
}
public void weiter() {
dia.weiter();
}
public void setAnzahl(int a) {
dia.setAnzahl(a);
}
public class pan extends JPanel {
@Override
public void paint(Graphics g) {
g.setColor(Color.red);
g.fillRect(0, 0, this.getWidth(), this.getHeight());
}
}
}

+ 35
- 0
src/Server/AcceptHandler.java View File

@ -0,0 +1,35 @@
package Server;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import com.sun.net.httpserver.HttpHandler;
import ffeststeuerungneu.Anzeige;
public class AcceptHandler implements HttpHandler{
private Anzeige anzeige;
public AcceptHandler(Anzeige anzeige) {
this.anzeige = anzeige;
}
@Override
public void handle(com.sun.net.httpserver.HttpExchange he) throws IOException {
anzeige.clickAccept();
he.sendResponseHeaders(200, 0);
OutputStream outputStream=he.getResponseBody();
outputStream.write(anzeige.getNumberOfImages());
outputStream.close();
System.out.println("Received Accept Request");
}
}

+ 46
- 0
src/Server/CountHandler.java View File

@ -0,0 +1,46 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Server;
import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpHandler;
import ffeststeuerungneu.Anzeige;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import javax.sound.sampled.Port;
import javax.xml.*;
/**
*
* @author Rino
*/
public class CountHandler implements HttpHandler {
private Anzeige anzeige;
public CountHandler(Anzeige anzeige) {
this.anzeige = anzeige;
}
@Override
public void handle(com.sun.net.httpserver.HttpExchange he) throws IOException {
//File file = new File("C:\\ffestData\\whatsapp\\grimassen(1).jpg");
he.sendResponseHeaders(200, 0);
OutputStream outputStream=he.getResponseBody();
outputStream.write(anzeige.getNumberOfImages());
outputStream.close();
System.out.println("Received Count Request");
}
}

+ 35
- 0
src/Server/DeclineHandler.java View File

@ -0,0 +1,35 @@
package Server;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import com.sun.net.httpserver.HttpHandler;
import ffeststeuerungneu.Anzeige;
public class DeclineHandler implements HttpHandler{
private Anzeige anzeige;
public DeclineHandler(Anzeige anzeige) {
this.anzeige = anzeige;
}
@Override
public void handle(com.sun.net.httpserver.HttpExchange he) throws IOException {
anzeige.clickDecline();
he.sendResponseHeaders(200, 0);
OutputStream outputStream=he.getResponseBody();
outputStream.write(anzeige.getNumberOfImages());
outputStream.close();
System.out.println("Received Accept Request");
}
}

+ 72
- 0
src/Server/ImageHandler.java View File

@ -0,0 +1,72 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Server;
import com.sun.net.httpserver.HttpHandler;
import ffeststeuerungneu.Anzeige;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import javax.imageio.ImageIO;
/**
*
* @author Rino
*/
public class ImageHandler implements HttpHandler {
private Anzeige anzeige;
public ImageHandler(Anzeige anzeige) {
this.anzeige = anzeige;
}
@Override
public void handle(com.sun.net.httpserver.HttpExchange he) throws IOException {
System.out.println("test");
File temp = new File("C:\\ffestData\\temp.jpg");
temp.createNewFile();
ImageIO.write(anzeige.getBild(), "jpg", temp);
he.sendResponseHeaders(200, temp.length());
he.setAttribute("image", 0);
OutputStream outputStream=he.getResponseBody();
Files.copy(temp.toPath(), outputStream);
outputStream.close();
System.out.println("Received REquest");
}
/*
@Override
public void handle(com.sun.net.httpserver.HttpExchange he) throws IOException {
File file = new File("C:\\ffestData\\whatsapp\\grimassen(1).jpg");
WritableRaster writableRaster=anzeige.getBild().getRaster();
DataBufferByte data=(DataBufferByte) writableRaster.getDataBuffer();
he.sendResponseHeaders(200, file.length());
he.setAttribute("image", 0);
OutputStream outputStream=he.getResponseBody();
outputStream.write(data.getData());
outputStream.close();
System.out.println("Received Image Request");
}
*/
}

+ 57
- 0
src/Server/Server.java View File

@ -0,0 +1,57 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Server;
import com.sun.net.httpserver.HttpServer;
import ffeststeuerungneu.Anzeige;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Rino
*/
public class Server {
HttpServer server;
Boolean running = false;
public Server(Anzeige anzeige){
try {
int port = 9000;
server = HttpServer.create(new InetSocketAddress(port), 0);
System.out.println("server started at " + port);
server.createContext("/image", new ImageHandler(anzeige));
server.createContext("/count", new CountHandler(anzeige));
server.createContext("/accept", new AcceptHandler(anzeige));
server.createContext("/decline", new DeclineHandler(anzeige));
server.setExecutor(null);
} catch (IOException ex) {
Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex);
}
}
public boolean getStatus(){
return running;
}
public void startServer(){
server.start();
running = true;
}
public void stopServer(){
System.out.println("stop");
server.stop(0);
running = false;
}
}

+ 71
- 0
src/ThreadSucheLinks.java View File

@ -0,0 +1,71 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import bilderAuswahl.ThreadBilderAuswahl;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
*
* @author Rino
*/
public class ThreadSucheLinks extends Thread {
private final String PFAD;// = "%appdata%\\.purple\\logs\\whatsapp\\491608599916";
// private String dir[];
private List<String> dir = new ArrayList();
private List<String> saved = new ArrayList();
// private String saved[] = new String[999];
private final File f;
private int n = 0;
private boolean save = false;
// private Thread dateien[] = new Thread[999];
private List<Thread> t = new ArrayList();
ThreadBilderAuswahl tba;
public ThreadSucheLinks(ThreadBilderAuswahl tba, String pfad) {
PFAD = pfad;
this.tba = tba;
f = new File(PFAD);
}
@Override
public void run() {
while (true) {
dir = new ArrayList<>(Arrays.asList(f.list()));
if (dir.size() > 0) {
for (int i = 0; i < dir.size(); i++) {
for (int j = 0; j < saved.size(); j++) {
if (dir.get(i).equals(saved.get(j))) {
save = true;
}
}
if (!save) {
saved.add(dir.get(i));
t.add(new Thread(new UeberwacheDatei(saved.get(n), this, tba, PFAD)));
t.get(n).start();
n++;
}
save = false;
}
}
}
}
}

+ 97
- 0
src/UeberwacheDatei.java View File

@ -0,0 +1,97 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import bilderAuswahl.ThreadBilderAuswahl;
import ffeststeuerungneu.Log;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import static java.lang.Thread.sleep;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author xewvtgbfhnju
*/
public class UeberwacheDatei implements Runnable {
private final String PFAD; //= "%appdata%\\.purple\\logs\\whatsapp\\491608599916";
private File f;
private File log[];
private BufferedReader br;
private String[] verarbeite;
private List<String> links = new ArrayList();
private String line;
private boolean schonda = false;
private ThreadBilderAuswahl tba;
public UeberwacheDatei(String Ordnername, ThreadSucheLinks sl, ThreadBilderAuswahl tba, String pfad) {
this.tba = tba;
PFAD = pfad;
f = new File(PFAD + "\\" + Ordnername);
log = f.listFiles();
try {
if (log.length > 0) {
br = new BufferedReader(new FileReader(log[0]));
}
} catch (FileNotFoundException ex) {
Logger.getLogger(UeberwacheDatei.class.getName()).log(Level.SEVERE, null, ex);
Log.setError(ex, "Class: File. File not found");
}
}
@Override
public void run() {
while (true) {
try {
line = " ";
while (line != null && br != null) {
line = br.readLine();
if (line != null && line.contains("<a href=")) {
verarbeite = line.split("\"");
for (int i = 0; i < links.size(); i++) {
if (links.get(i).equals(verarbeite[5])) {
schonda = true;
}
}
if (!schonda) {
links.add(verarbeite[5]);
this.open(verarbeite[5]);
}
}
}
} catch (IOException ex) {
Logger.getLogger(UeberwacheDatei.class.getName()).log(Level.SEVERE, null, ex);
Log.setError(ex, "Class: ÜberwacheDaite. WhatsappLog not found");
}
try {
sleep(1000);
} catch (InterruptedException ex) {
Logger.getLogger(UeberwacheDatei.class.getName()).log(Level.SEVERE, null, ex);
Log.setError(ex, "Class: ÜberwacheDaite. Thread Interrupted");
}
}
}
private void open(String link) {
tba.neuesBild(link);
Log.incWhatsapp();
}
}

+ 52
- 0
src/appium/AppiumServer.java View File

@ -0,0 +1,52 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package appium;
import io.appium.java_client.service.local.AppiumDriverLocalService;
import io.appium.java_client.service.local.AppiumServiceBuilder;
import io.appium.java_client.service.local.flags.GeneralServerFlag;
import org.openqa.selenium.remote.DesiredCapabilities;
//import org.apache.commons.
/**
*
* @author Rino
*/
public class AppiumServer {
static AppiumDriverLocalService service;
static AppiumServiceBuilder builder;