Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
 protected void AssignDefaultName()
 {
     Name = "Group " + Labeler.GetLabelForIndex(Round.Groups.Count);
     MarkAsModified();
 }