登录用户超时注销、登录日志记录

This commit is contained in:
Administrator
2026-08-28 14:12:02 +08:00
parent 11142481a8
commit 6dfac6d986
9 changed files with 87 additions and 9 deletions
+31
View File
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace JinYuan.Helper
{
public class InputMessageFilter : IMessageFilter
{
private Action onActivity;
public InputMessageFilter(Action onActivity)
{
this.onActivity = onActivity;
}
public bool PreFilterMessage(ref Message m)
{
// 鼠标移动(0x0200)、鼠标按下(0x0201)、键盘按下(0x0100)等
if (m.Msg == 0x0200 || m.Msg == 0x0201 || m.Msg == 0x0204
|| m.Msg == 0x0100 || m.Msg == 0x0101)
{
onActivity?.Invoke();
}
return false; // 不拦截消息,继续传递
}
}
}