Esempio n. 1
0
        static void Main(string[] args)
        {
            Clocks  myClock = new Clocks();
            Analog  c1      = new Analog();
            Digital c2      = new Digital();

            c1.Subscribe(myClock);
            c2.Subscribe(myClock);
            myClock.Run();
        }
Esempio n. 2
0
 public void Subscribe(Clocks clocks)
 {
     clocks.onSecondChange += new SecondChangeHandler(Show);
 }