private void lblUsername_Click(object sender, EventArgs e) { using (frmViewUser frm = new frmViewUser(_senderPeer)) { frm.ShowDialog(); } }
private void lstUsers_ItemClick(object sender, EventArgs e) { UserListItem item = lstUsers.SelectedItem as UserListItem; if (item != null) { using (frmViewUser frm = new frmViewUser(item.Peer)) { frm.ShowDialog(this); } } }