private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { LineageServer selectedServer = (LineageServer)listBox1.SelectedItem; richTextBox1.Text = selectedServer.Description; set_serverstatus_label(selectedServer.serverStatus); }
void populateServers() { var zelgo = new LineageServer("Resurrection", "198.58.107.60", 46838) { Description = " 12x XP until 52 then 6x\n Adena 8x\n Drops 3x\n Karma 16x" }; var zelgotest = new LineageServer("Resurrection Test", "24.99.243.145", 46838) { Description = "Extremely high rate server with character copy from Resurrection. Meant for testing." }; listBox1.Items.Add(zelgo); listBox1.Items.Add(zelgotest); }
private void button1_Click(object sender, EventArgs e) { int tries = 0; LineageServer selectedServer = (LineageServer)listBox1.SelectedItem; if (selectedServer == null) { return; } var ipaddr = (uint)IPAddress.NetworkToHostOrder((int)IPAddress.Parse(selectedServer.IP).Address); ProcLauncher.CreateLinProcess(textBox1.Text, ipaddr, selectedServer.Port, textBox2.Text, textBox3.Text); curPort++; }
void set_serverstatus_label(LineageServer.ServerStatus status) { label2.Text = string.Format("Server is {0}", status); }