Example #1
0
 public bool getDay(dayOfWeek day, List <ExerciseDay> listofDays, out ExerciseDay OutPutDay)
 {
     foreach (ExerciseDay d in listofDays)
     {
         if (d.day == day)
         {
             OutPutDay = d;
             return(true);
         }
     }
     OutPutDay = null;
     return(false);
 }
Example #2
0
        public static void PopulateExerciseClasses(List <ExerciseDay> Zuma, List <ExerciseDay> Spinning)
        {
            List <time> times = new List <time> {
            };                                     //gets reused...

            times.Add(new time(1, 4, 12));
            times.Add(new time(3, 4, 10));
            times.Add(new time(5, 4, 17));
            times.Add(new time(7, 4, 22));
            ExerciseDay temp = new ExerciseDay(times); // gets reused...

            temp.day = dayOfWeek.monday;
            Zuma.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(1, 4, 11));
            times.Add(new time(3, 4, 13));
            times.Add(new time(5, 4, 17));
            times.Add(new time(7, 4, 22));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.tuesday;
            Zuma.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(1, 4, 12));
            times.Add(new time(3, 4, 10));
            times.Add(new time(5, 4, 22));
            times.Add(new time(7, 4, 22));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.wednesday;
            Zuma.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(1, 4, 9));
            times.Add(new time(3, 4, 14));
            times.Add(new time(5, 4, 17));
            times.Add(new time(7, 4, 22));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.tuesday;
            Zuma.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(1, 4, 12));
            times.Add(new time(3, 4, 10));
            times.Add(new time(5, 4, 21));
            times.Add(new time(7, 4, 12));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.friday;
            Zuma.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(1, 4, 12));
            times.Add(new time(3, 4, 10));
            times.Add(new time(5, 4, 5));
            times.Add(new time(7, 4, 10));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.saturday;
            Zuma.Add(temp);

            //------------------------------------------------
            //Add data for Spinning exercise class....
            //------------------------------------------------

            times = new List <time> {
            };
            times.Add(new time(2, 5, 7));
            times.Add(new time(4, 5, 11));
            times.Add(new time(6, 5, 15));
            times.Add(new time(8, 5, 8));
            temp     = new ExerciseDay(times); // gets reused...
            temp.day = dayOfWeek.monday;
            Spinning.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(2, 5, 9));
            times.Add(new time(4, 5, 9));
            times.Add(new time(6, 5, 9));
            times.Add(new time(8, 5, 9));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.tuesday;
            Spinning.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(2, 5, 3));
            times.Add(new time(4, 5, 12));
            times.Add(new time(6, 5, 13));
            times.Add(new time(8, 5, 7));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.wednesday;
            Spinning.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(2, 5, 2));
            times.Add(new time(4, 5, 9));
            times.Add(new time(6, 5, 9));
            times.Add(new time(8, 5, 10));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.thursday;
            Spinning.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(2, 5, 8));
            times.Add(new time(4, 5, 4));
            times.Add(new time(6, 5, 9));
            times.Add(new time(8, 5, 4));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.friday;
            Spinning.Add(temp);

            times = new List <time> {
            };
            times.Add(new time(2, 5, 4));
            times.Add(new time(4, 5, 5));
            times.Add(new time(6, 5, 9));
            times.Add(new time(8, 5, 3));
            temp     = new ExerciseDay(times);
            temp.day = dayOfWeek.saturday;
            Spinning.Add(temp);
        }