public void AcceptConnection() { if (listener.Pending()) { var client = new Connection(0, listener.AcceptTcpClient()) { OperationCode = new OperationCode() }; Authentication.Add(client); } }
private void button1_Click(object sender, EventArgs e) { WebForm form = new WebForm(); form.Authenticated += (o, auth) => { Authentication.Add(auth); var g = Authentication.GetLogins(); comboBox1.Items.Clear(); foreach (string item in g) { comboBox1.Items.Add(item); } comboBox1.SelectedIndex = 0; form.Dispose(); }; form.Show(); }