summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/config/config_file.java
diff options
context:
space:
mode:
authorunknown2014-02-26 16:28:11 +0100
committerunknown2014-02-26 16:28:11 +0100
commitd07c7effb917fdb0e6092761b4c0d0f42c3895f7 (patch)
tree7bb7ebdc3a9b252fbd2675cbd92996110d58075c /Dozentenmodul/src/config/config_file.java
parentKommunikation von BwLehrpool Suite zu BwLehrpool Suite Server läuft nun über ... (diff)
downloadtutor-module-d07c7effb917fdb0e6092761b4c0d0f42c3895f7.tar.gz
tutor-module-d07c7effb917fdb0e6092761b4c0d0f42c3895f7.tar.xz
tutor-module-d07c7effb917fdb0e6092761b4c0d0f42c3895f7.zip
-Suchfenster verbessert
- On The Fly nach Name funktioniert nun - Tab Meine Images nun Funktionsfähig -Möglichkeit der Konfiguration der Anwendung ist geschaffen, somit können die beiden GUIs BillOfRights und der Link zu vmware player für immer ausgeblendet werden -Thrift ist nun fertig implementiert
Diffstat (limited to 'Dozentenmodul/src/config/config_file.java')
-rw-r--r--Dozentenmodul/src/config/config_file.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/Dozentenmodul/src/config/config_file.java b/Dozentenmodul/src/config/config_file.java
new file mode 100644
index 00000000..31fb5b1d
--- /dev/null
+++ b/Dozentenmodul/src/config/config_file.java
@@ -0,0 +1,56 @@
+package config;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.ini4j.Wini;
+public class config_file {
+
+ public boolean createConfig() throws IOException{
+
+ String config_file="C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite";
+ File config=new File(config_file);
+ String file=config_file+"\\config.ini";
+ File conf=new File(file);
+ Wini ini;
+ if(config.exists()==false)
+ {
+ config.mkdir();
+
+
+ conf.createNewFile();
+ ini=new Wini(conf);
+
+ if(conf.canWrite()==true)
+ {
+ ini.put("main", "BillOfRights",false);
+ ini.put("main", "vmware", false);
+ ini.store();
+
+ return true;
+ }
+
+ }
+ else
+ {
+
+ if(conf.exists()==false)
+ {
+ conf.createNewFile();
+ ini=new Wini(conf);
+
+ if(conf.canWrite()==true)
+ {
+ ini.put("main", "BillOfRights",false);
+ ini.put("main", "vmware", false);
+ ini.store();
+
+ return true;
+ }
+ }
+ }
+ return true;
+
+ }
+
+}