📄 ticker.cs
字号:
namespace Operators
{
using System.Timers;
public delegate void Tick();
class Ticker
{
public Ticker()
{
this.ticking.Elapsed += new ElapsedEventHandler(this.OnTimedEvent);
this.ticking.Interval = 1000; // 1 second
this.ticking.Enabled = true;
}
public event Tick tick;
private void OnTimedEvent(object source, ElapsedEventArgs args)
{
if (this.tick != null)
{
this.tick();
}
}
private System.Timers.Timer ticking = new System.Timers.Timer();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -