public void SendParticipants(string conferenceId, List <Participant> participants) { var command = new ParticipantsCommand(conferenceId) { Participants = participants }; SendCommand(command); }
private void ProcessParticipantsCommand(ParticipantsCommand participantsCommand) { Invoke(new Action(() => { dataGridView.DataSource = participantsCommand.Participants; foreach (DataGridViewRow row in dataGridView.Rows) { if (row.Cells["IdColumn"].Value.Equals(_id)) { foreach (DataGridViewCell cell in row.Cells) { cell.Style.BackColor = Color.Gainsboro; } } } var me = participantsCommand.Participants.First(p => p.Id == _id); _paintColor = Color.FromArgb(me.BrushArgb); _paintControl.Color = _paintColor; })); }