修正项目

This commit is contained in:
admin
2021-01-05 11:11:28 +08:00
parent 56d6cc89e9
commit e9b4b307c9
93 changed files with 2524 additions and 156 deletions

View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace U8AppMain
{
public class MessageFilter : IMessageFilter
{
private Timer timer = new Timer();
private int _lastTick = Environment.TickCount;
public MessageFilter(int closeInterval = 60)
{
this._closeInterval = closeInterval * 1000;
this.timer.Interval = 10000;
this.timer.Tick += Timer_Tick;
this.timer.Start();
}
private int _closeInterval;
private void Timer_Tick(object sender, EventArgs e)
{
if (Environment.TickCount - _closeInterval > Environment.TickCount)
{
Application.Exit();
}
}
public bool PreFilterMessage(ref Message m)
{
if (m.Msg == (int)WindowsMessages.WM_MOUSEMOVE || m.Msg == (int)WindowsMessages.WM_KEYUP)
{
this._lastTick = Environment.TickCount;
}
return false;
}
}
}