尝试停止运行我的C#Windows应用程序 [英] try to stop run my C# windows application

查看:93
本文介绍了尝试停止运行我的C#Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我正在使用C#Windows应用程序,但要在特定日期后停止运行C#Windows应用程序.
请帮助


谢谢与问候
Indrajit Dasgupta

Hi All
I am working on C# windows application I want to stop run my C# windows application after a specific date
Please Help


Thanks & Regards
Indrajit Dasgupta

推荐答案

如果您想将应用程序转换为试用版,也可以升级为完整版,请参阅CP上的相关文章解决问题的方法:应用程序试用版 [
If you want to turn your application into a trial version which can also be upgraded to a full version there is an article here on CP that will give you a solution to your problem: Application Trial Maker[^].

Regards,

Manfred


在表单上放置一个计时器组件,配置60000毫秒的间隔.在Timer事件处理程序中,检查当前日期.如果这是您的特定日期,请终止该应用程序.
Place a timer component on your form, configure an interval of 60000 milliseconds. In the Timer event handler, check the current date. If it is your specific date, terminate the application.


如果您依赖Windows datetime而不是用户可以更改date-time,那么我在应用程序中所做的我将维护日志详细信息为此,在每次登录和注销时,我将其保存到数据库中,在登录之前,我得到了最后一次注销,并将其与datetime匹配.现在,如果它小于最后一次注销,则表明错误.注销时会执行相同的操作. 在进行datetime.now并最后一次注销后,我正在计算天数,
为了安全起见,我以加密形式保存登录和注销信息,希望对我有用.
如果有更好的解决方案,请让我知道,因为明天或后天,我将在客户端PC上部署我的应用程序.

问候
If you will rely on windows datetime than user may change date-time , what I have done in my application I am maintaining a log detail for this purpose, On each login and logout I am saving it to database, before login I get last logout and match it with datetime.now if its less than last logout then it shows error same thing is done on logout.
after marching datetime.now with last logout I am calculating days,
for security purpose I am saving login and logout in encrypted form, I hope this will work for me.
if any one have better solution please let me know because tomorrow or day after tomorrow I am going to deploy my app on client pc.

Regards


这篇关于尝试停止运行我的C#Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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