send versucht zu implementieren
This commit is contained in:
@@ -10,7 +10,6 @@ import ChatProgramm.model.Server;
|
||||
import ChatProgramm.util.OhmLogger;
|
||||
import ChatProgramm.view.ChatView;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JRadioButton;
|
||||
@@ -25,12 +24,16 @@ public class CommandConnect implements CommandInterface
|
||||
private JRadioButton rBtnClient;
|
||||
private JDialog dialogFenster;
|
||||
private static Logger lg = OhmLogger.getLogger();
|
||||
private final Client client;
|
||||
private final Server server;
|
||||
|
||||
public CommandConnect(ChatView view)
|
||||
public CommandConnect(ChatView view, Server server, Client client)
|
||||
{
|
||||
rBtnServer = view.getBtnServer();
|
||||
rBtnClient = view.getBtnClient();
|
||||
dialogFenster = view.getjDialog1();
|
||||
this.client = client;
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -39,7 +42,7 @@ public class CommandConnect implements CommandInterface
|
||||
if(rBtnServer.isSelected()){
|
||||
lg.info("Server ausgewählt");
|
||||
try {
|
||||
new Server();
|
||||
server.connect();
|
||||
} catch (IOException ex) {
|
||||
lg.info("Die Verbindung zum Server ist Fehlgeschlagen");
|
||||
}
|
||||
@@ -48,7 +51,7 @@ public class CommandConnect implements CommandInterface
|
||||
if(rBtnClient.isSelected()){
|
||||
lg.info("Client ausgewählt");
|
||||
try {
|
||||
new Client();
|
||||
client.connect();
|
||||
} catch (IOException ex) {
|
||||
lg.info("Die Verbindung zum Client ist Fehlgeschlagen");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user