Exemplo n.º 1
0
        //滴答
        public void Tick(int hour, int minute, int second)
        {
            TickEventArgs args = new TickEventArgs()
            {
                Hour = hour, Minute = minute, Second = second
            };

            TickEvent(this, args);
        }
Exemplo n.º 2
0
 //滴答具体方法
 static public void ClockTick(object sender, TickEventArgs args)
 {
     Console.WriteLine($"Tick. It's {args.Hour}:{args.Minute}:{args.Second} now.");
 }
Exemplo n.º 3
0
 void ClockTick(object sender, TickEventArgs args)
 {
     Console.WriteLine($"{args.Hour}:{args.Minute}:{args.Second}");
 }