提交记录修改Core/Servicers/Instances/Main.cs+7 −2看文件
修改Core/Servicers/Instances/Sleepdiscover.cs+4 −0看文件
| @@ -144,7 +144,7 @@ namespace Core.Servicers.Instances | ||
| 144 | 144 | this.sleepStatus = sleepStatus; |
| 145 | 145 | |
| 146 | 146 | Debug.WriteLine("睡眠状态:" + sleepStatus); |
| 147 | 删除: | |
| 147 | 新增: Logger.Info("【" + sleepStatus + "】当前进程:" + activeProcess); | |
| 148 | 148 | if (sleepStatus == SleepStatus.Sleep) |
| 149 | 149 | { |
| 150 | 150 | // 更新时间 |
| @@ -154,6 +154,11 @@ namespace Core.Servicers.Instances | ||
| 154 | 154 | //activeSeconds = 0; |
| 155 | 155 | //activeTimer.Stop(); |
| 156 | 156 | } |
| 157 | 新增: else if (sleepStatus == SleepStatus.Wake) | |
| 158 | 新增: { | |
| 159 | 新增: // 唤醒时重置计时开始时间 | |
| 160 | 新增: activeStartTime = DateTime.Now; | |
| 161 | 新增: } | |
| 157 | 162 | } |
| 158 | 163 | |
| 159 | 164 | private void Observer_OnAppActive(string processName, string description, string file) |
| @@ -261,7 +266,7 @@ namespace Core.Servicers.Instances | ||
| 261 | 266 | |
| 262 | 267 | |
| 263 | 268 | |
| 264 | 删除: Logger.Info(sleepStatus + " 进程:" + activeProcess + " 更新时间:" + seconds); | |
| 269 | 新增: Logger.Info("【"+sleepStatus + "】进程:" + activeProcess + " 更新时间:" + seconds + ",开始时间:" + activeStartTime.ToString() + ",当前时间:" + DateTime.Now.ToString()); | |
| 265 | 270 | |
| 266 | 271 | |
| 267 | 272 | data.Set(activeProcess, activeProcessDescription, activeProcessFile, seconds); |
| @@ -214,7 +214,11 @@ namespace Core.Servicers.Instances | ||
| 214 | 214 | SleepStatusChanged?.Invoke(status); |
| 215 | 215 | } |
| 216 | 216 | } |
| 217 | 新增: | |
| 218 | 新增: Logger.Info("【当前坐标】status:" + status + ",lastPoint:" + lastPoint.ToString() + ",now point:" + point.ToString()); | |
| 217 | 219 | Win32API.GetCursorPos(out lastPoint); |
| 220 | 新增: Logger.Info("【更新坐标】status:" + status + ",lastPoint:" + lastPoint.ToString() + ",now point:" + point.ToString()); | |
| 221 | 新增: | |
| 218 | 222 | } |
| 219 | 223 | |
| 220 | 224 | |

