private ListParticipations_Layout New_ListParticipationsLayout(List <Participation> participations) { ListParticipations_Layout result = new ListParticipations_Layout(participations, this.ShowRatings, this.engine, this.scoreSummarizer, this.layoutStack, this.randomGenerator); result.AddParticipationComment += Result_AddParticipationComment; return(result); }
private void show() { List <Participation> participations = this.activity.getParticipationsSince(this.start); // we reduce the number of visible participations string title; int maxNumParticipations = 20; if (participations.Count > maxNumParticipations) { title = "Last " + maxNumParticipations + " participations in " + this.activity.Name; participations = participations.GetRange(participations.Count - maxNumParticipations, maxNumParticipations); } else { title = "Participations in " + this.activity.Name + " since " + this.start; } ListParticipations_Layout content = new ListParticipations_Layout(participations, this.engine, this.scoreSummarizer, this.layoutStack); content.AddParticipationComment += Content_AddParticipationComment; TitledControl results = new TitledControl(title, content, 10); this.layoutStack.AddLayout(results, "Participations"); }