private void MessageReceived(DecodedShortMessage message) { var data = message.Data as SmsDeliverPdu; bool found = false; foreach (var participant in _quiz.Participants) { if (participant.PhoneNumber == data.OriginatingAddress) { found = true; participant.Name = Regex.Replace(data.UserDataText, "\\s+", " "); } } if (!found) { var participant = new Participant(); participant.Name = Regex.Replace(data.UserDataText, "\\s+", " "); participant.PhoneNumber = data.OriginatingAddress; _quiz.Participants.Add(participant); } }
public ParticipantAnswer(Participant participant) { Participant = participant; }
public WinnerPage(Participant participant) { Winner = participant; InitializeComponent(); }