summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/gui/Login_GUI.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/gui/Login_GUI.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/gui/Login_GUI.java')
-rw-r--r--Dozentenmodul/src/gui/Login_GUI.java57
1 files changed, 50 insertions, 7 deletions
diff --git a/Dozentenmodul/src/gui/Login_GUI.java b/Dozentenmodul/src/gui/Login_GUI.java
index c982fa7b..990500db 100644
--- a/Dozentenmodul/src/gui/Login_GUI.java
+++ b/Dozentenmodul/src/gui/Login_GUI.java
@@ -18,9 +18,17 @@ import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JPasswordField;
+
+import org.ini4j.InvalidFileFormatException;
+import org.ini4j.Wini;
+
+import config.config_file;
+
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.SystemColor;
+import java.io.File;
+import java.io.IOException;
@SuppressWarnings("serial")
@@ -29,7 +37,7 @@ public class Login_GUI extends JFrame {
private JPanel contentPane;
private JTextField username;
private JPasswordField pass;
-
+
/**
* Launch the application.
*/
@@ -37,9 +45,22 @@ public class Login_GUI extends JFrame {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
+
+ config_file cf=new config_file();
+ boolean conf=cf.createConfig();
+ if(conf==true)
+ {
//Aufruf und Anzeige des Login Fensters
Login_GUI frame = new Login_GUI();
frame.setVisible(true);
+ }
+ else
+ {
+ JOptionPane.showMessageDialog(null,
+ "Fehler beim erzeugen der Konfigurationsfile", "Message",
+ JOptionPane.ERROR_MESSAGE);
+ }
+
} catch (Exception e) {
e.printStackTrace();
}
@@ -126,12 +147,34 @@ public class Login_GUI extends JFrame {
if(login==true)
{
-
- //Erstellen einer Instanz der Aktionsauswahl
- BillOfRights_GUI re=new BillOfRights_GUI();
- re.setVisible(true);
- //Schließen des Fensters nach erfolgreichen Login
- setVisible(false);
+ try {
+ Wini ini=new Wini(new File("C:\\Users\\"+System.getProperty("user.name")+"\\AppData\\Roaming\\bwLehrpoolSuite\\config.ini"));
+ if(ini.get("main", "BillOfRights",boolean.class)==false){
+ //Erstellen einer Instanz der Aktionsauswahl
+ BillOfRights_GUI re=new BillOfRights_GUI();
+ re.setVisible(true);
+ //Schließen des Fensters nach erfolgreichen Login
+ setVisible(false);
+ }
+ else
+ {
+ if(ini.get("main", "vmware",boolean.class)==false){
+ VmWareLink_GUI vm=new VmWareLink_GUI();
+ vm.setVisible(true);
+ setVisible(false);
+ }
+ else
+ {
+ MainMenue_GUI main=new MainMenue_GUI();
+ main.setVisible(true);
+ setVisible(false);
+ }
+ }
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
}
else
{