Пример #1
0
 void check(TrainingPlanEntry entry, TrainingPlanCheckResult result)
 {
     if (!pack.Exercises.Contains(entry.ExerciseId))
     {
         result.AddResult(entry, "TrainingPlan_ExerciseDoesntExist", TrainingPlanCheckItemStatus.Warning);
     }
     for (int i = 0; i < entry.Sets.Count; i++)
     {
         var set = entry.Sets[i];
         if (set.DropSet != DropSetType.None && entry.Sets.IndexOf(set) < entry.Sets.Count - 1)
         {
             result.AddResult(set, "TrainingPlan_DropSetInNotOnlyLastSet", TrainingPlanCheckItemStatus.Information);
         }
     }
 }
Пример #2
0
 public SuperSet(TrainingPlanEntry entry1, TrainingPlanEntry entry2)
 {
     SuperSets.Add(entry1);
     SuperSets.Add(entry2);
 }
Пример #3
0
 public void AddEntry(TrainingPlanEntry entry)
 {
     Entries.Add(entry);
     entry.Day = this;
 }
Пример #4
0
 public void RemoveEntry(TrainingPlanEntry entry)
 {
     Entries.Remove(entry);
     entry.Day = null;
 }
Пример #5
0
        public SuperSet GetSuperSet(TrainingPlanEntry planEntry)
        {
            var res = from set in SuperSets where set.SuperSets.Contains(planEntry) select set;

            return(res.SingleOrDefault());
        }