如何运行每个应用程序的活动应用程序和工作时间? [英] How to get running active applications and working hours per application?

查看:67
本文介绍了如何运行每个应用程序的活动应用程序和工作时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b

现在我使用c#windows App获取正在运行的应用程序列表。





如何使用c#.net获取工作时间?例如,我每天工作8小时,然后4小时用于Visual Studio,4小时用于Excelsheet。我想在C#.net windows应用程序中获取这些信息



如果有人知道,请告诉我。





谢谢。

Hi
Now I get the list of running applications using c# windows App.


How to get worked Hours for application using c#.net? For Example I have worked 8 hours a day then 4hours for Visual studio and 4 hours for Excelsheet. I want to get these information in C#.net windows applications

Please let me know if anybody knows.


Thanks.

推荐答案

有一个服务或小的永远活动的程序,它将轮询进程并将开始时间写入存储(数据库/文件/等等)。



当在下次调查中没有找到该过程时,你会写出结束时间。



最后,你从存储中选择并计算时间差异并在一天内对其进行sumarize(所以你可以有两个excel开始并且每个结束两个小时)



优化:有一个包含时间跟踪应用程序列表的查找表,以便只跟踪列表中的那些。



优化2:使用Windows系统挂钩,有一篇关于CP的好文章。





如果这有帮助请花点时间接受解决方案。谢谢。
Have a service or small always active program that will poll the processes and write the start times into the storage (database / file / whatever).

When, in the next poll the process is not found, you write END time.

Finally, you select from the storage and calculate time diff and sumarize it over the day (so you could have two excel starts and ends for two hours each)

Refinements: have a lookup table with the list of time tracked applications so that only those in the list are tracked.

Refinement2: use windows system hooks, there is a good article on CP somewhere.


If this helps please take time to accept the solution. Thank you.


这篇关于如何运行每个应用程序的活动应用程序和工作时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆