Exemple #1
0
        static void Main(string[] args)
        {
            Clock   clock    = new Clock();
            Sleeper sleeper1 = new Sleeper("小孟");

            clock.Tick  += new EventHandler(sleeper1.sleeping);
            clock.Alarm += new EventHandler(sleeper1.alarmed);
            clock.onTickComing("dddd");
            clock.onAlarmComing("dddd");
            Console.WriteLine("Hello World!");
        }