Esempio n. 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}");
        }
Esempio n. 2
0
        public SetHoursState(TimerSetup context) : base(context)
        {
            DateTime now = DateTime.Now;

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