private void addTaggedFriendToDataGridView(TaggedFriend i_Friend) { int newRow = dataGridViewTaggedFriends.Rows.Add(); dataGridViewTaggedFriends.Rows[newRow].Cells[0].Value = i_Friend.User.Name; dataGridViewTaggedFriends.Rows[newRow].Cells[1].Value = i_Friend.Likes; dataGridViewTaggedFriends.Rows[newRow].Cells[2].Value = i_Friend.Photos.Count; }
private void updateWinnerPlace(Label i_Label, PictureBox i_picBox, TaggedFriend i_Friend) { if (i_Friend != null) { i_picBox.Invoke(new Action( () => i_picBox.LoadAsync(i_Friend.User.PictureNormalURL))); i_Label.Invoke(new Action(() => i_Label.Text = i_Friend.User.Name)); i_Label.Invoke(new Action(() => i_Label.Visible = true)); } else { MessageBox.Show("ERROR in updateWinnerPlace() method =>" + Environment.NewLine + "NULL exception: NULL TaggedFriend object reference"); } }