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

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