Example #1
0
        static void Main(string[] args)
        {
            TimerSetup setup = new TimerSetup();

            setup.ShowDisplay();

            setup.OnTimerPressed();
            setup.ShowDisplay();

            setup.OnUpPressed();
            setup.OnUpPressed();
            setup.ShowDisplay();

            setup.OnOkPressed();
            setup.OnDownPressed();
            setup.OnDownPressed();
            setup.OnDownPressed();
            setup.ShowDisplay();

            setup.OnOkPressed();
            setup.ShowDisplay();

            // Timer setup finished
            setup.OnOkPressed();
            setup.ShowDisplay();

            Console.WriteLine($"Timer was set to {setup.TimerSet}");
        }
Example #2
0
        public SetHoursState(TimerSetup context) : base(context)
        {
            DateTime now = DateTime.Now;

            _timerHours = now.Hour;
        }
Example #3
0
 public TimerSetupStateBase(TimerSetup context) => _context = context;
Example #4
0
 public NormalState(TimerSetup context) : base(context)
 {
 }