예제 #1
0
파일: RoundBase.cs 프로젝트: Gherks/slask
        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));
        }
예제 #2
0
 protected void AssignDefaultName()
 {
     Name = "Group " + Labeler.GetLabelForIndex(Round.Groups.Count);
     MarkAsModified();
 }