protected bool AssignDefaultName() { string defaultName; for (int index = 0; index < Tournament.Rounds.Count; ++index) { bool roundAlreadyAddedToTournament = Tournament.Rounds[index].Id == Id; if (roundAlreadyAddedToTournament) { --index; bool renameFailed = true; do { defaultName = "Round " + Labeler.GetLabelForIndex(++index); renameFailed = !RenameTo(defaultName); }while (renameFailed); } } defaultName = "Round " + Labeler.GetLabelForIndex(Tournament.Rounds.Count); return(RenameTo(defaultName)); }
protected void AssignDefaultName() { Name = "Group " + Labeler.GetLabelForIndex(Round.Groups.Count); MarkAsModified(); }