What is application timer and what this code does?
Let say you have windows application, which you want to sell but before user will buy the application you want the user to try the demo version. Application timer is a program, which will detect to see if the current application is expired after a certain time. This will convert your application to demo or evolution version.
In this code I have three input properties. "daysSelect" property is set to pass the number of days that you wants to expire your application, "dateInstall" property is set to pass the installation date which can be saved during the installation in a registry, file or in a dll, and also to enable this process set "evaluationVersion" property to "ON".
By storing installation date to text file, registry, or into dll, it may also be a good idea to apply encryption to the installation date, so it can be protected more further.
And also this code can be used for the web application where you want to expire user password or disable his account privileges.
From this code you will also learn how to work with dates in .NET framework.
I know this process may be not safe proof; but it will give your application some protection.
Posted Online: http://www.csharphelp.com/archives2/archive320.html