Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating trail version of my Application I give 2 months trial period for my App but when the user change the system time trial period is updated to prevent this problem I want to create my own calendar and use it is date if you have any solution to my problem please............ help me.
Note: if you have any other solution to solve my problem please help me

thanks advance!


What I have tried:

DateTime todayDate = DateTime.Now;
DateTime after3MonthDate = todayDate.AddMonths(3);
//Set First Day of Month
after3MonthDate = new DateTime(after3MonthDate.Year, after3MonthDate.Month, 1);
Posted
Updated 30-Oct-17 1:31am

Solution: You can check date time in internet instead of time check in System.

Please refer the solution here https://nickstips.wordpress.com/2010/02/12/c-get-nist-internet-time/
 
Share this answer
 
v2
If you want to do this you need to save the Date when your Application startet 1st time.
If Now - 3 Months is greater than this date the trial-period is over.
So :
- if your Application starts look if the file where you want to save the Date (and perhaps other Settings) is existing
-> if not save the current date into this file - so now it exists
-> if Yes then do the calculation
-> depending on the result do the next (Start Application - OR - Show Message and finish the Application)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900