diff options
Diffstat (limited to 'Dozentenmodul/src/gui/image/FTPDownloader_GUI.java')
| -rw-r--r-- | Dozentenmodul/src/gui/image/FTPDownloader_GUI.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java index 671b2170..97a29849 100644 --- a/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java +++ b/Dozentenmodul/src/gui/image/FTPDownloader_GUI.java @@ -34,6 +34,7 @@ import javax.swing.JTextPane; import javax.swing.JSeparator; import models.Image; import models.Links; +import models.SessionData; import org.apache.thrift.TException; import server.Server.Client; @@ -55,7 +56,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener JLabel downspeed; User user; JProgressBar progressBar; - String host = "141.79.128.102"; + String host = SessionData.session.getServerAdress(); int port = 21; String downloadFile = ""; static String arg = ""; @@ -69,8 +70,8 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener long bytesread; JLabel labelZeit; boolean taskrun = false; - ThriftConnection thrift = new ThriftConnection(); - Client client = thrift.getThriftConnection(); + ThriftConnection con = new ThriftConnection(); + Client client = models.Client.clientcon.getClient(); JButton btnZurck = new JButton("Zur\u00FCck"); JButton btnDownloadStarten = new JButton("Download starten"); JButton btnMainMenu = new JButton("Hauptmen\u00FC"); @@ -86,7 +87,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener if (taskrun == true) { try { client.DeleteFtpUser(user.userName); - thrift.closeThriftConnection(); + con.closeThriftConnection(); } catch (TException e1) { // TODO Auto-generated catch block e1.printStackTrace(); @@ -354,7 +355,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener "Debug-Message", JOptionPane.ERROR_MESSAGE); } } - thrift.closeThriftConnection(); + SearchEditImage_GUI se = new SearchEditImage_GUI(); se.setVisible(true); dispose(); @@ -367,7 +368,7 @@ public class FTPDownloader_GUI extends JFrame implements PropertyChangeListener btnMainMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { - thrift.closeThriftConnection(); + MainMenue_GUI mm = new MainMenue_GUI(); mm.setVisible(true); dispose(); |
