Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Implementing evaluationMonitor.Invalid?

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Pointeman



Joined: 07 Sep 2010
Posts: 56

PostPosted: Thu Dec 30, 2010 2:41 pm    Post subject: Implementing evaluationMonitor.Invalid? Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Dec 30, 2010 11:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group