Esempio n. 1
0
        private static void SeedMeets(SwimMeet meet1, SwimMeet meet2)
        {
            meet1.Seed();
            meet2.Seed();

            DisplayInfo("meet1", meet1);
            DisplayInfo("meet2", meet2);
        }
Esempio n. 2
0
        private static void CreateSwimMeets(out SwimMeet meet1, out SwimMeet meet2)
        {
            Console.WriteLine("*******meets and events ******\n***********************************");
            meet1           = new SwimMeet();
            meet1.Name      = "Winnter Splash";
            meet1.StartDate = new DateTime(2017, 1, 10);
            meet1.EndDate   = new DateTime(2017, 1, 12);
            DisplayInfo("meet1", meet1);


            meet2 = new SwimMeet("Spring Splash", new DateTime(2017, 5, 21), new DateTime(2017, 5, 21), PoolType.SCM, 2);
            DisplayInfo("meet2", meet2);
        }
Esempio n. 3
0
        private static void AddEventsToSwimMeets(SwimMeet meet1, SwimMeet meet2, Event _50free1, Event _100fly, Event _200breast, Event _400free, Event _1500free, Event _1500free2)
        {
            meet1.AddEvent(_50free1);
            meet1.AddEvent(_100fly);
            meet1.AddEvent(_200breast);
            meet1.AddEvent(_1500free2);

            meet2.AddEvent(_400free);
            meet2.AddEvent(_1500free);

            DisplayInfo("meet1", meet1);
            DisplayInfo("meet2", meet2);
        }
Esempio n. 4
0
        private static void AddSwimmersToEvents(Registrant swimmer1, Registrant swimmer2, Registrant swimmer3, SwimMeet meet1, SwimMeet meet2, Event _50free1, Event _100fly, Event _200breast, Event _400free, Event _1500free, Event _1500free2)
        {
            //Add swimmers to event
            _50free1.AddSwimmer(swimmer1);
            _50free1.AddSwimmer(swimmer2);
            _50free1.AddSwimmer(swimmer3);
            try
            {
                _50free1.AddSwimmer(swimmer3);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            _100fly.AddSwimmer(swimmer1);
            _100fly.AddSwimmer(swimmer2);

            _200breast.AddSwimmer(swimmer1);
            _200breast.AddSwimmer(swimmer2);
            _200breast.AddSwimmer(swimmer3);

            _400free.AddSwimmer(swimmer2);

            _1500free.AddSwimmer(swimmer1);
            _1500free.AddSwimmer(swimmer2);
            _1500free.AddSwimmer(swimmer3);

            _1500free2.AddSwimmer(swimmer1);
            _1500free2.AddSwimmer(swimmer3);

            DisplayInfo("meet1", meet1);
            DisplayInfo("meet2", meet2);
        }
Esempio n. 5
0
        private static void EnterTimesForSwims(Registrant swimmer1, Registrant swimmer2, Registrant swimmer3, SwimMeet meet1, SwimMeet meet2, Event _50free1, Event _100fly, Event _200breast, Event _400free, Event _1500free, Event _1500free2)
        {
            Console.WriteLine("********** Adding swim times for swimmers *********");

            _50free1.EnterSwimmersTime(swimmer1, "00:30.13");
            _50free1.EnterSwimmersTime(swimmer2, "00:28.87");
            _50free1.EnterSwimmersTime(swimmer3, "00:29.54");

            _100fly.EnterSwimmersTime(swimmer1, "01:17.23");
            _100fly.EnterSwimmersTime(swimmer2, "01:05.16");

            _200breast.EnterSwimmersTime(swimmer1, "02:25.23");
            _200breast.EnterSwimmersTime(swimmer3, "02:17.03");

            _400free.EnterSwimmersTime(swimmer2, "04:55.23");

            _1500free.EnterSwimmersTime(swimmer1, "15:17.23");
            _1500free.EnterSwimmersTime(swimmer2, "16:17.23");
            _1500free.EnterSwimmersTime(swimmer3, "17:17.23");

            _1500free2.EnterSwimmersTime(swimmer1, "15:16.23");
            _1500free2.EnterSwimmersTime(swimmer3, "17:18.23");

            try
            {
                _400free.EnterSwimmersTime(swimmer1, "04:55.23");
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            DisplayInfo("meet1", meet1);
            DisplayInfo("meet2", meet2);
        }