View previous topic :: View next topic |
Author |
Message |
Pointeman
Joined: 07 Sep 2010 Posts: 56
|
Posted: Thu Dec 30, 2010 2:41 pm Post subject: Implementing evaluationMonitor.Invalid? |
|
|
Q. Would the following code be the correct usage of evaluationMonitor.Invalid?
EvaluationMonitor eMonitor = new RegistryEvaluationMonitor(password)
if (eMonitor.Invalid == true) //anti-tampering check
{
MessageBox.Show("License Tampering Detected!");
Environment.Exit(1);
}
while (_license == null)
{
EvaluationDialog eDialog = new EvaluationDialog(eMonitor, System.Windows.Forms.Application.ProductName);
eDialog.TrialDays = 30;
EvaluationDialogResult dialogResult = eDialog.ShowDialog();
if (dialogResult == EvaluationDialogResult.Exit)
return false;
if (dialogResult == EvaluationDialogResult.Continue)
break;
if (dialogResult == EvaluationDialogResult.InstallLicense)
{
AuthenticatedLicenseInstallForm licenseForm = new AuthenticatedLicenseInstallForm();
_license = licenseForm.ShowDialog(_licenseFile, null);
}
} |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Dec 30, 2010 11:04 pm Post subject: |
|
|
Yes that is correct. However since the Invalid flag is only set when clock winding is detected there is no real point in doing it there (because you are using the UsageCount which is unaffected by clock winding). The EvaluationDialog will check the Invalid flag and will disable the Continue evaluation button if it is set. _________________ Infralution Support |
|
Back to top |
|
|
|