/// <summary> /// The user has clicked the connect button and so the connection info is sent and the client connects to the server. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void HandleConnectionButton(object sender, EventArgs e) { var args = new ConnectionInfoEventArgs(DisplayNameFld.Text ?? "NOBODY", AddressFld.Text ?? ""); events.OnConnectionInfoEvent(this, args); ConnectBtn.Enabled = false; }
private void HandleConnectionInfoEvent(object sender, ConnectionInfoEventArgs e) { var ip = e.Address; displayName = e.DisplayName; Events.OnConnectEvent(this, new ConnectEventArgs(ip)); }