跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

提交记录
修改Core/Servicers/Instances/Main.cs+7 −2看文件
@@ -144,7 +144,7 @@ namespace Core.Servicers.Instances
144144 this.sleepStatus = sleepStatus;
145145
146146 Debug.WriteLine("睡眠状态:" + sleepStatus);
147删除:
147新增: Logger.Info("【" + sleepStatus + "】当前进程:" + activeProcess);
148148 if (sleepStatus == SleepStatus.Sleep)
149149 {
150150 // 更新时间
@@ -154,6 +154,11 @@ namespace Core.Servicers.Instances
154154 //activeSeconds = 0;
155155 //activeTimer.Stop();
156156 }
157新增: else if (sleepStatus == SleepStatus.Wake)
158新增: {
159新增: // 唤醒时重置计时开始时间
160新增: activeStartTime = DateTime.Now;
161新增: }
157162 }
158163
159164 private void Observer_OnAppActive(string processName, string description, string file)
@@ -261,7 +266,7 @@ namespace Core.Servicers.Instances
261266
262267
263268
264删除: Logger.Info(sleepStatus + " 进程:" + activeProcess + " 更新时间:" + seconds);
269新增: Logger.Info("【"+sleepStatus + "】进程:" + activeProcess + " 更新时间:" + seconds + ",开始时间:" + activeStartTime.ToString() + ",当前时间:" + DateTime.Now.ToString());
265270
266271
267272 data.Set(activeProcess, activeProcessDescription, activeProcessFile, seconds);
修改Core/Servicers/Instances/Sleepdiscover.cs+4 −0看文件
@@ -214,7 +214,11 @@ namespace Core.Servicers.Instances
214214 SleepStatusChanged?.Invoke(status);
215215 }
216216 }
217新增:
218新增: Logger.Info("【当前坐标】status:" + status + ",lastPoint:" + lastPoint.ToString() + ",now point:" + point.ToString());
217219 Win32API.GetCursorPos(out lastPoint);
220新增: Logger.Info("【更新坐标】status:" + status + ",lastPoint:" + lastPoint.ToString() + ",now point:" + point.ToString());
221新增:
218222 }
219223
220224