Esempio n. 1
0
        public Clock(IAlarm alarm, IDisplay display)
        {
            _alarm         = alarm;
            _buttonManager = new ButtonManager();
            _display       = display;
            _modeManager   = new ModeManager();
            _timeManager   = new TimeManager();
            _timer         = new SixtySecondTimer();

            _buttonManager.SetModeManager(_modeManager);
            _buttonManager.SetTimeManager(_timeManager);

            _timeManager.SetAlarm(_alarm);
            _timeManager.SetDisplay(_display);
            _timeManager.SetModeManager(_modeManager);
            _timer.SetTimeManager(_timeManager);
        }