summaryrefslogtreecommitdiffstats
path: root/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java
diff options
context:
space:
mode:
authorNino Breuer2014-05-22 15:41:51 +0200
committerNino Breuer2014-05-22 15:41:51 +0200
commit8ee0ed5c5a947ecff257f799dfa60b9b000aab75 (patch)
treee5790134d1cada9aee15611f8818fa7da71cd982 /Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java
parentVorbereitung Multithreading (diff)
parentMerge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module (diff)
downloadtutor-module-8ee0ed5c5a947ecff257f799dfa60b9b000aab75.tar.gz
tutor-module-8ee0ed5c5a947ecff257f799dfa60b9b000aab75.tar.xz
tutor-module-8ee0ed5c5a947ecff257f799dfa60b9b000aab75.zip
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Conflicts: Dozentenmodul/bin/gui/intro/Login_GUI.class Dozentenmodulserver/bin/server/ServerHandler.class Dozentenmodulserver/bin/server/startServer.class Dozentenmodulserver/src/server/startServer.java
Diffstat (limited to 'Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java')
-rw-r--r--Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java51
1 files changed, 44 insertions, 7 deletions
diff --git a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java
index 285a4ff6..ff19ed13 100644
--- a/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java
+++ b/Dozentenmodul/src/gui/lecture/CreateLectureLink_GUI.java
@@ -16,6 +16,7 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
+import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@@ -44,6 +45,7 @@ import javax.swing.border.EmptyBorder;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;
import models.Lecture;
+import models.Links;
import models.person;
import org.apache.thrift.TException;
import server.Server.Client;
@@ -66,7 +68,7 @@ public class CreateLectureLink_GUI extends JFrame {
String[] titles = { "Image-Name", "Lizenzpflichtig", "OS", "Veranstaltung",
"Verantwortlicher", "Letztes Update", "Schlagwort" };
ThriftConnection con = new ThriftConnection();
- Client client = con.getThriftConnection();
+ Client client = models.Client.clientcon.getClient();
/**
* Launch the application.
@@ -88,6 +90,7 @@ public class CreateLectureLink_GUI extends JFrame {
addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent arg0) {
+ con.closeThriftConnection();
System.exit(0);
}
@@ -347,7 +350,7 @@ public class CreateLectureLink_GUI extends JFrame {
JButton cancelButton = new JButton("Zur\u00FCck");
cancelButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
- con.closeThriftConnection();
+
CreateLectureAllgemein_GUI eVAG = new CreateLectureAllgemein_GUI();
eVAG.setVisible(true);
dispose();
@@ -395,14 +398,14 @@ public class CreateLectureLink_GUI extends JFrame {
person.verantwortlicher.getHochschule(),
person.verantwortlicher.getEMail(),
person.verantwortlicher.getTel(),
- person.verantwortlicher.getFakultät());
+ person.verantwortlicher.getFakultaet());
JOptionPane
.showMessageDialog(
null,
- "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmenü zurück.",
+ "Ihre Veranstaltung wurde erfolgreich angelegt. Sie kehren nun zum Hauptmen\u00fc zur\u00fcck.",
"Veranstaltung angelegt",
JOptionPane.INFORMATION_MESSAGE);
- // zurück zum Menü
+ // zurueck zum Menue
MainMenue_GUI m = new MainMenue_GUI();
m.setVisible(true);
} catch (TException e1) {
@@ -418,13 +421,13 @@ public class CreateLectureLink_GUI extends JFrame {
e1.getCause()+"\n"+e1.getMessage(),
"Debug-Message", JOptionPane.ERROR_MESSAGE);
}
- con.closeThriftConnection();
+
dispose();
} else {
// nothing selected
JOptionPane.showMessageDialog(null,
- "Bitte wählen Sie ein Image aus.",
+ "Bitte w\u00e4hlen Sie ein Image aus.",
"Image Auswahl",
JOptionPane.INFORMATION_MESSAGE);
}
@@ -457,9 +460,43 @@ public class CreateLectureLink_GUI extends JFrame {
menuBar.add(mnNewMenu_1);
JMenuItem mntmFaq = new JMenuItem("FAQ");
+ mntmFaq.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mousePressed(MouseEvent arg0) {
+
+ String faq;
+
+ faq = Links.getFAQ();
+
+ try {
+ Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + faq );
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+ });
+
mnNewMenu_1.add(mntmFaq);
JMenuItem mntmOtrs = new JMenuItem("OTRS");
+ mntmOtrs.addMouseListener(new MouseAdapter() {
+ @Override
+ public void mousePressed(MouseEvent arg0) {
+ String otrs;
+
+ otrs = Links.getOTRS();
+
+ try {
+ Runtime.getRuntime().exec( "rundll32 url.dll,FileProtocolHandler " + otrs );
+ } catch (IOException f) {
+ // TODO Auto-generated catch block
+ f.printStackTrace();
+ }
+
+ }
+ });
+
mnNewMenu_1.add(mntmOtrs);
}