public static void connectServer(object Sender, EventArgs e) { try { client1.Show(); } catch { client1 = new ChatClient.ClientForm(); client1.Show(); } }
public FTSender(string IP, string PORT, string fileName, ChatClient.ClientForm me) { if (ChatClient.ClientForm.serverBusy == true) { MessageBox.Show("Another file transfer is in Progress!", "Server Busy", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } this.IP = IP; this.PORT = PORT; this.fileName = fileName; FTSender.me = me; size = new FileInfo(fileName).Length; }
public FTReciever(String IP, String PORT, string fileName, StreamWriter sw, String sender,Int64 size, ChatClient.ClientForm me, OBJTYPE objType, Object parent) { if (ChatClient.ClientForm.serverBusy == true) { MessageBox.Show("Another file transfer is in Progress!", "Server Busy", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } listener = new TcpListener(IPAddress.Parse(ChatClient.ClientForm.myIp), int.Parse(PORT)); this.saveFile = fileName; this.swSender = sw; this.sender = sender; this.size = size; FTReciever.me = me; this.objType = objType; FTReciever.parent = parent; }
public FTReciever(String IP, String PORT, string fileName, StreamWriter sw, String sender, Int64 size, ChatClient.ClientForm me, OBJTYPE objType, Object parent) { if (ChatClient.ClientForm.serverBusy == true) { MessageBox.Show("Another file transfer is in Progress!", "Server Busy", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } listener = new TcpListener(IPAddress.Parse(ChatClient.ClientForm.myIp), int.Parse(PORT)); this.saveFile = fileName; this.swSender = sw; this.sender = sender; this.size = size; FTReciever.me = me; this.objType = objType; FTReciever.parent = parent; }