跳到主要内容

github/tai

公开

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

提交记录
修改Core/Servicers/Instances/Main.cs+29 −0看文件
@@ -78,6 +78,10 @@ namespace Core.Servicers.Instances
7878 /// 配置忽略进程名称列表
7979 /// </summary>
8080 private List<string> ConfigIgnoreProcessList;
81新增: // 更新应用日期
82新增: private DateTime updadteAppDateTime_ = DateTime.Now.Date;
83新增: // 已经更新过的应用列表
84新增: private List<string> updatedAppList = new List<string>();
8185 public Main(
8286 IObserver observer,
8387 IData data,
@@ -275,6 +279,31 @@ namespace Core.Servicers.Instances
275279 IconFile = iconFile,
276280 });
277281 }
282新增: else
283新增: {
284新增: if (updadteAppDateTime_ != DateTime.Now.Date)
285新增: {
286新增: updadteAppDateTime_ = DateTime.Now.Date;
287新增: updatedAppList.Clear();
288新增: }
289新增:
290新增: if (!updatedAppList.Contains(processName))
291新增: {
292新增: // 更新应用信息
293新增: app.IconFile = Iconer.ExtractFromFile(file, processName, description);
294新增:
295新增: if (app.Description != description)
296新增: {
297新增: app.Description = description;
298新增: }
299新增: if (app.File != file)
300新增: {
301新增: app.File = file;
302新增: }
303新增: appData.UpdateApp(app);
304新增: updatedAppList.Add(processName);
305新增: }
306新增: }
278307
279308 return true;
280309 }