Hello friends,
Do you have any idea how to validate my software for 15 days without using Database.. i want to give software for demo perpuse... if any idea then please suggest me....
thanks i Advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kunal VaishyaPosted Apr 19, 2012, 2:37 AM
try this Logic first time when you start software store date in registry . whenever you start check it find difference current date and registry date greater than 15 give them registration message
Kunal VaishyaPosted Apr 19, 2012, 10:27 PM
its also restrict of date change itvery use full
let me know
private DateTime RegDate;
private DateTime todayDate;
private void CheckLicenceAgreement()
{
try
{
//If Not Exist The Add Date Firet Time
if (Convert.ToString(Application.UserAppDataRegistry.GetValue("RegDate")) == "")
{
RegDate = DateTime.Now;
RegDate = RegDate.AddDays(15);
Application.UserAppDataRegistry.SetValue("RegDate", RegDate.ToString("yyyyMMdd"));
Application.UserAppDataRegistry.SetValue("ApplicationStart", "1");
}
else
{
//Check It
Int32 Regdt;
Int32 todt;
Regdt = Convert.ToInt32(Application.UserAppDataRegistry.GetValue("RegDate"));
todt = Convert.ToInt32(System.DateTime.Now.ToString("yyyyMMdd"));
if ((todt > Regdt) || (Convert.ToString(Application.UserAppDataRegistry.GetValue("ApplicationStart")))=="0")
{
Application.UserAppDataRegistry.SetValue("ApplicationStart", "0");
Application.Exit();
}
}
}
catch (Exception ex)
{
Application.Exit();
}
}
Sam HobbsPosted Apr 19, 2012, 9:15 PM
Also, you say "without using Database". For what? Do you mean you want to show how your program works using some data but you do not want the data to be read from a database or written to a database?
Kunal VaishyaPosted Apr 19, 2012, 4:43 AM
try this
http://www.c-sharpcorner.com/UploadFile/sushmita_kumari/RegistryKeys102082006061720AM/RegistryKeys1.aspx
still any confusion then let me know
Naeem KhanPosted Apr 19, 2012, 2:48 AM