2024-12-13 17:36:35 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using Framework;
|
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
|
|
|
|
|
|
public partial class SROptions
|
|
|
|
|
|
{
|
2025-02-12 17:59:07 +08:00
|
|
|
|
/*[Category("跨天检测"), DisplayName("检查节点-小时")]
|
2024-12-23 13:05:52 +08:00
|
|
|
|
public int Hours { get; set; }
|
2024-12-13 17:36:35 +08:00
|
|
|
|
|
|
|
|
|
|
[Category("跨天检测"), DisplayName("检查节点-分钟")]
|
2024-12-23 13:05:52 +08:00
|
|
|
|
public int Minutes { get; set; }
|
2024-12-13 17:36:35 +08:00
|
|
|
|
|
|
|
|
|
|
[Category("跨天检测"), DisplayName("检查节点-秒")]
|
2024-12-23 13:05:52 +08:00
|
|
|
|
public int Seconds { get; set; }
|
2024-12-13 17:36:35 +08:00
|
|
|
|
|
|
|
|
|
|
[Category("跨天检测"), DisplayName("设置检测时间")]
|
|
|
|
|
|
public void SetCheckTime()
|
|
|
|
|
|
{
|
2024-12-23 13:05:52 +08:00
|
|
|
|
if (Hours is < 0 or >= 24)
|
2024-12-13 17:36:35 +08:00
|
|
|
|
{
|
|
|
|
|
|
DebugUtil.LogError("GM设置检查时间单位小时错误,范围在0-23");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-23 13:05:52 +08:00
|
|
|
|
if (Minutes is < 0 or >= 60)
|
2024-12-13 17:36:35 +08:00
|
|
|
|
{
|
|
|
|
|
|
DebugUtil.LogError("GM设置检查时间单位分钟错误,范围在0-59");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-23 13:05:52 +08:00
|
|
|
|
if (Seconds is < 0 or >= 60)
|
2024-12-13 17:36:35 +08:00
|
|
|
|
{
|
|
|
|
|
|
DebugUtil.LogError("GM设置检查时间单位秒错误,范围在0-59");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-23 13:05:52 +08:00
|
|
|
|
CrossDayChecker.Instance.SetCheckTime(new TimeSpan(Hours, Minutes, Seconds));
|
2024-12-13 17:36:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Category("跨天检测"), DisplayName("发送跨天事件")]
|
|
|
|
|
|
public void SendCrossDay()
|
|
|
|
|
|
{
|
|
|
|
|
|
EventManager.Instance.Send(EventManager.EventName.CrossDay);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Category("跨天检测"), DisplayName("直接发送跨周事件")]
|
|
|
|
|
|
public void SendCrossWeek()
|
|
|
|
|
|
{
|
|
|
|
|
|
EventManager.Instance.Send(EventManager.EventName.CrossWeek);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Category("跨天检测"), DisplayName("直接发送跨月事件")]
|
|
|
|
|
|
public void SendCrossMonth()
|
|
|
|
|
|
{
|
|
|
|
|
|
EventManager.Instance.Send(EventManager.EventName.CrossMonth);
|
2025-02-12 17:59:07 +08:00
|
|
|
|
}*/
|
2024-12-13 17:36:35 +08:00
|
|
|
|
}
|