📄 mod_timestatus.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using System.Timers;
namespace MsgSystem
{
//this class is used to refresh the status of the time status of the main window,
//it uses a easy timer, refresh the time every one second
static class Mod_TimeStatus
{
static Timer timeRefresher = null;
static DateTime timer;
static string timeString = "";
public static void ticker(object src, ElapsedEventArgs evt)
{
timer = DateTime.Now;
timeString = timer.Year + " - " + timer.Month + " - " + timer.Day + " " + timer.Hour + ":" + timer.Minute + ":" + timer.Second;
Program.main_wnd.setTimeStatus(timeString);
}
public static void init()
{
timeRefresher = new Timer(100);
ElapsedEventHandler eeh = new ElapsedEventHandler(ticker);
timeRefresher.Elapsed += eeh;
timeRefresher.Start();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -