Exemple #1
0
 StepByStepPicking(
     FilteringHeuristic filtering)     //choosing next value (tries all possible variations of parametrs, if doesnt fit - backtracking will solve the issue)
 {
     if (filtering == FilteringHeuristic.NONE)
     {
         if (Value.TeacherValue != Teachers.Last())
         {
             Value.TeacherValue = Teachers.ElementAt(Teachers.IndexOf(Value.TeacherValue) + 1);
         }
         else if (Value.AudienceValue != Audiences.Last())
         {
             Value.TeacherValue  = Teachers.First(); // resetting previous data element
             Value.AudienceValue = Audiences.ElementAt(Audiences.IndexOf(Value.AudienceValue) + 1);
         }
         else if (Value.TimeValue != Times.Last())
         {
             Value.AudienceValue = Audiences.First(); // resetting previous data element
             Value.TimeValue     = Times.ElementAt(Times.IndexOf(Value.TimeValue) + 1);
         }
         else if (Value.DayValue != Days.Last())
         {
             Value.TimeValue = Times.First(); // resetting previous data element
             Value.DayValue  = Days.ElementAt(Days.IndexOf(Value.DayValue) + 1);
         }
     }
     else
     {
         Value = new Value(PossibleValues.First());
         PossibleValues.RemoveAt(0);
     }
 }
Exemple #2
0
 public void InitValue()
 {
     Value.DayValue      = Days.First();
     Value.TimeValue     = Times.First();
     Value.AudienceValue = Audiences.First();
     Value.TeacherValue  = Teachers.First();
     Value.Empty         = false;
 }