//tick处理事件 private void Clock_OnTick(object sender, TickEventArgs args) { Console.WriteLine($"Tick!,当前时间:{this.hour}:{this.minute}:{this.second}"); }
//触发tick事件 public void Tick() { TickEventArgs args = new TickEventArgs(this.hour, this.minute, this.second); this.OnTick(this, args); }