public void Start() { ReadConfigSettings(); _client = new TrackManiaRPCClient(ConfigSettings.ServerAddress, ConfigSettings.ServerXMLRPCPort); _client.Connected += Connected; _client.ServerClosedConnection += ServerClosedConnection; _client.SocketError += SocketError; _client.ReadyForSendingCommands += ReadyForSendingCommands; _client.Connect(); }
private void ServerClosedConnection(object sender, EventArgs e) { Log.InfoToUI(string.Format("Lost connection to server {0} at port {1}.", ConfigSettings.ServerAddress, ConfigSettings.ServerXMLRPCPort)); DisposePlugins(true); _client.Connect(); }
private void ConnectButton_Click(object sender, EventArgs e) { ConnectButton.Enabled = false; Client.Connect(); }