public PingServer ( string host, int port, string &error ) : ServerPingData | ||
host | string | |
port | int | |
error | string | |
return | ServerPingData |
private void PingServer(ServerPinger pinger) { string error = ""; ServerPingData ping = pinger.PingServer(Data.IP, Data.Port, out error); Ping = ping; //If no error if (error == string.Empty) { //Set the controls with the recieved data Stats.Text = ping.Online + "/" + ping.MaxOnline; Stats.Left = (ClientWidth - (int)Manager.Skin.Fonts["Default14"].Resource.MeasureString(Stats.Text).X) - 4 - 32; Motd.Text = ping.Description; } else { Motd.Text = error; Motd.TextColor = Color.Gold; } }