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 

Using inherited controls

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



Joined: 07 Feb 2007
Posts: 7

PostPosted: Thu Feb 08, 2007 3:45 pm    Post subject: Using inherited controls Reply with quote

Hi all

suppose you have this licensed control:

Code:
<LicenseProvider(GetType(EncryptedLicenseProvider))> _
Public Class MyControl
    Inherits System.Windows.Forms.Control
End Class


and another licensed control that inherits from the control above:

Code:
<LicenseProvider(GetType(EncryptedLicenseProvider))> _
Public Class MyInheritedControl
    Inherits MyControl
End Class


This means that license is checked twice?

I have another question: using ILS3, and assuming I'm developing a collection of controls, what is the fastest and easiest way to get the current License object from any part of the code?

Thank you.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Feb 08, 2007 10:26 pm    Post subject: Reply with quote

The LicenseProvider attribute doesn't actually cause the license to be checked (the code in the control constructor typically does this). The attribute associates the license provider with the control type. This means that when you then call the LicenseManager class to get the license for a given type it will use that LicenseProvider. Visual Studio will also realize that it is a licensed control and add an entry in the Licenses.licx file when you use the designer to add the control.

If you put the license check in both controls constructors then it would indeed get checked twice. If you have different licenses for the base and derived control then this might be what you want (ie the customer needs both licenses to use the derived control). If you are licensing a suite of controls and want to use a single license for them all then check out our FAQ on the subject:

http://www.infralution.com/phpBB2/viewtopic.php?t=207
_________________
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