示例#1
0
 public void UpdateFlash(SenderFlashStatus aFlasherButton)
 {
     if (aFlasherButton.Flash)
     {
         counter = 0;
     }
 }
示例#2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            AnalogClock  analogClockObserver  = new AnalogClock();
            DigitalClock digitalClockObserver = new DigitalClock();

            aConcreteButton = new SenderFlashStatus();

            aConcreteButton.AttachAClock(analogClockObserver);
            aConcreteButton.AttachAClock(digitalClockObserver);

            analogClockObserver.TimerTickEvent  += DrawClockPlease;
            digitalClockObserver.TimerTickEvent += DrawDigitalClock;
        }