Пример #1
0
    public static bool TimeSatisfies(DateTime time, PressedTimeAdj expectedTime)
    {
        switch (expectedTime)
        {
        case PressedTimeAdj.ODD: return(time.Hour % 2 == 1);

        case PressedTimeAdj.EVEN: return(time.Hour % 2 == 0);

        case PressedTimeAdj.MORNING: return(time.Hour < 12);

        case PressedTimeAdj.AFTERNOON: return(time.Hour >= 12);
        }

        return(false);
    }
Пример #2
0
 public void RandomizeFrom(VariationPoolForRules variationsToUse)
 {
     colorAdj = variationsToUse.PopRandomColor();
     timeAdj  = variationsToUse.PopRandomPressTime();
 }
Пример #3
0
 public static string GetDescriptionFor(PressedTimeAdj time)
 {
     return(description [(int)time]);
 }