void Client_TextReceived(TCPClient client, string text) { string from = GetTagToken(text, "1"); string command = GetTagToken(text, "2"); string forx = ""; string dowhat = ""; if (from.ToLower() == "client" && command.ToLower() == "command") { forx = GetTagToken(text, "3"); dowhat = GetTagToken(text, "4"); UpdateServerListBox("Inwards <", "client has told me to " + dowhat); } else { UpdateServerListBox("Inwards <", text); } }
void Client_ClientConnected(TCPClient client) { ConnectedToServer = true; UpdateServerListBox("Inwards <", "Connected to server"); }
void Client_ClientDisconnected(TCPClient client, string errorMessage) { ConnectedToServer = false; UpdateServerListBox("Inwards <", "Disconnected from server " + errorMessage); }