private void LoadInvitees(RSVPStatus rsvpStatus) { lblInviteeCount.Visible = true; groupBox1.Visible = true; flpInvitees.Controls.Clear(); int width = flpInvitees.Width; foreach (EventUser invitee in _invitees) { if (invitee.Attending == rsvpStatus) { ProfileListItem profile = new ProfileListItem(invitee.User); profile.Width = width - (flpInvitees.Padding.Horizontal) - 20; flpInvitees.Controls.Add(profile); profile.ProfileItemSelected += new EventHandler <ProfileItemSelectedEventArgs>(profile_ProfileItemSelected); } } string plural = string.Empty; if (_invitees.Count != 1) { plural = "s"; } lblInviteeCount.Text = String.Format(CultureInfo.InvariantCulture, Facebook.Properties.Resources.lblInvitees, _event.Name, _invitees.Count, plural); }
private void LoadFriends() { flpFriends.Controls.Clear(); int width = flpFriends.Width; foreach (User friend in _friends) { ProfileListItem profile = new ProfileListItem(friend); profile.Width = width - (flpFriends.Padding.Horizontal) - 20; flpFriends.Controls.Add(profile); profile.ProfileItemSelected += new EventHandler <ProfileItemSelectedEventArgs>(profile_ProfileItemSelected); } string plural = string.Empty; if (_friends.Count != 1) { plural = "s"; } lblFriendCount.Text = String.Format(CultureInfo.InvariantCulture, Facebook.Properties.Resources.lblFriendCount, _friends.Count, plural); }
private void LoadFriends() { flpFriends.Controls.Clear(); int width = flpFriends.Width; foreach (User friend in _friends) { ProfileListItem profile = new ProfileListItem(friend); profile.Width = width - (flpFriends.Padding.Horizontal) - 20; flpFriends.Controls.Add(profile); profile.ProfileItemSelected += new EventHandler<ProfileItemSelectedEventArgs>(profile_ProfileItemSelected); } string plural = string.Empty; if (_friends.Count != 1) { plural = "s"; } lblFriendCount.Text = String.Format(CultureInfo.InvariantCulture, Resources.lblFriendCount, _friends.Count, plural); }
private void LoadInvitees(RSVPStatus rsvpStatus) { lblInviteeCount.Visible = true; groupBox1.Visible = true; flpInvitees.Controls.Clear(); int width = flpInvitees.Width; foreach (EventUser invitee in _invitees) { if (invitee.Attending == rsvpStatus) { ProfileListItem profile = new ProfileListItem(invitee.User); profile.Width = width - (flpInvitees.Padding.Horizontal) - 20; flpInvitees.Controls.Add(profile); profile.ProfileItemSelected += new EventHandler<ProfileItemSelectedEventArgs>(profile_ProfileItemSelected); } } string plural = string.Empty; if (_invitees.Count != 1) { plural = "s"; } lblInviteeCount.Text = String.Format(CultureInfo.InvariantCulture, Facebook.Properties.Resources.lblInvitees, _event.Name, _invitees.Count, plural); }