提交记录修改Core/Servicers/Instances/Sleepdiscover.cs+11 −1看文件
| @@ -96,6 +96,16 @@ namespace Core.Servicers.Instances | ||
| 96 | 96 | { |
| 97 | 97 | if (status == SleepStatus.Sleep) |
| 98 | 98 | { |
| 99 | 新增: TimeSpan timeSpan = DateTime.Now - pressKeyboardLastTime; | |
| 100 | 新增: | |
| 101 | 新增: Point point; | |
| 102 | 新增: Win32API.GetCursorPos(out point); | |
| 103 | 新增: if (lastPoint.ToString() == point.ToString() && timeSpan.TotalSeconds > 10) | |
| 104 | 新增: { | |
| 105 | 新增: // 非鼠标或键盘激活 | |
| 106 | 新增: return; | |
| 107 | 新增: } | |
| 108 | 新增: | |
| 99 | 109 | status = SleepStatus.Wake; |
| 100 | 110 | SleepStatusChanged?.Invoke(status); |
| 101 | 111 | } |
| @@ -106,7 +116,7 @@ namespace Core.Servicers.Instances | ||
| 106 | 116 | timer = new DispatcherTimer(); |
| 107 | 117 | timer.Interval = new TimeSpan(0, 2, 0); |
| 108 | 118 | #if DEBUG |
| 109 | 删除: timer.Interval = new TimeSpan(0, 0, 10); | |
| 119 | 新增: //timer.Interval = new TimeSpan(0, 0, 10); | |
| 110 | 120 | #endif |
| 111 | 121 | timer.Tick += Timer_Tick; |
| 112 | 122 | timer.Start(); |

