예제 #1
0
 public void Seed()
 {
     for (int i = 0; i < NoOfRegistrants; i++)
     {
         Swim newSwim = new Swim(1 + i / SwimMeet.Lanes, 1 + i % SwimMeet.Lanes);
         newSwim.Registrant = Registrants[i];
         newSwim.SwimEvent  = this;
         swims[i]           = newSwim;
     }
 }
예제 #2
0
 public void Seed()
 {
     for (int i = 0; i < Registrants.Count; i++)
     {
         Swim newSwim = new Swim(1 + i / SwimMeet.Lanes, 1 + i % SwimMeet.Lanes);
         newSwim.Registrant = Registrants[i] as Swimmer;
         newSwim.SwimEvent  = this;
         Swims.Add(newSwim);
     }
 }
예제 #3
0
        public void EnterSwimmersTime(Registrant registrant, string swimTime)
        {
            Swimmer swimmer = registrant as Swimmer;

            if (Registrants.Contains(registrant))
            {
                int  locator           = Registrants.IndexOf(registrant);
                Swim correspondingSwim = Swims[locator] as Swim;
                correspondingSwim.SwimTime = swimTime;
                swimmer.AddAsBestTime(swimMeet.PoolType, Distance, Stroke, TimeSpan.Parse("00:" + swimTime));
                return;
            }
            throw new Exception("Swimmer has not entered event");
        }