12345678910111213141516171819202122232425262728 |
- using System.Windows.Forms;
- using UAS_PLCDataReader.Entity;
- namespace UAS_PLCDataReader.PublicMethod
- {
-
-
-
-
-
- class GlobalEventsHandler : IMessageFilter
- {
-
- public const int WM_LBUTTONDOWN = 0x0201;
-
- public const int WM_KEYDOWN = 0x100;
- public bool PreFilterMessage(ref Message m)
- {
- Control c = Control.FromHandle(m.HWnd);
- if (m.Msg == WM_LBUTTONDOWN && c.GetType().ToString().ToUpper().Contains("BUTTON"))
- {
- LogicHandler.DoCommandLog(User.UserCode, c.Parent.Text, "点击【" + c.Text + "】按钮");
- }
- return false;
- }
- }
- }
|