private void button1_Click(object sender, EventArgs e) { Random rd = new Random(); int port = rd.Next(1000, 9999); label1.Text = "port:" + port; client.Init(ConfigurationManager.AppSettings["SERVERIP"], int.Parse(ConfigurationManager.AppSettings["SERVERPORT"]), port); }
private void button1_Click(object sender, EventArgs e) { Random rd = new Random(); int port = rd.Next(1000, 9999); label1.Text = "port:" + port; client.Init("127.0.0.1", 9840, port); }