我想在C#Windows应用程序中仅使用我的客户端应用程序15天 [英] i want to use my client application for only 15 days in c# windows application

查看:54
本文介绍了我想在C#Windows应用程序中仅使用我的客户端应用程序15天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想使用我的客户端应用程序15天.怎么可能有任何代码.

i want to use my client application for only 15 days.how it is possible any code.
it is possible in c# windows application.

推荐答案

是.
但是...

而且这是一个很大的但是"-如果人们愿意的话,要绕过它从来没有那么困难,除非您进行在线检查.例如,更改系统日期非常容易,并且会愚弄基本系统.

这取决于您要保护代码的数量以及要付出的努力(以及要冒给潜在客户造成烦恼的风险)

Google可以在这里为您提供帮助(尝试使用演示版c#"-这将为您提供大量有用的结果),或者在此处查看: ^ ]
Yes.
But...

And it''s a fairly big "but" - it''s never that difficult to get round, if people want to, unless you do an online check. Changing the system date (for example) is pretty easy, and will fool basic systems.

It depends how much you want to protect your code, and how much effort you want to put in (and how much you want to risk annoying potential customers)

Google can help you here (try "demo version c#" - that will give you a large set of useful results), or see here: Application Trial Maker[^]


是的,您可以在15天后限制您的应用程序不运行.

只需在主要启动表单上编写以下代码:


DateTime dtAppBuild = System.IO.File.GetLastWriteTime(Application.ExecutablePath);
if(dtAppBuild.AddDays(15)< DateTime.Now)Application.Exit();
Yes u can restrict your application after 15 days to not run.

Just write the following code on main startup form:


DateTime dtAppBuild = System.IO.File.GetLastWriteTime(Application.ExecutablePath);
if (dtAppBuild.AddDays(15) < DateTime.Now) Application.Exit();


这篇关于我想在C#Windows应用程序中仅使用我的客户端应用程序15天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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