private void InitializeClient(string username, string serverIP) { client = new TestClient(serverIP, 43594, this); client.Start(); client.SendPacket(new LoginPacket { Username = username }); }
private void btnSend_Click(object sender, EventArgs e) { SuspendLayout(); client.SendPacket(new ChatPacket { Message = txtMsg.Text }); //AddText(text); txtMsg.Clear(); ResumeLayout(); }