// Adds the LicenseProviderAttribute to the control.
[LicenseProvider(typeof(LicFileLicenseProvider))]
public class MyControl : Control
{ // Creates a new, null license.
private License license = null; public MyControl ()
{ // Adds Validate to the control's constructor.
license = LicenseManager.Validate(typeof(MyControl), this); // Insert code to perform other instance creation tasks here.
} protected override void Dispose(bool disposing)
{
if(disposing)
{
if (license != null)
{
license.Dispose();
license = null;
}
}
}}
[LicenseProvider(typeof(LicFileLicenseProvider))]
public class MyControl : Control
{ // Creates a new, null license.
private License license = null; public MyControl ()
{ // Adds Validate to the control's constructor.
license = LicenseManager.Validate(typeof(MyControl), this); // Insert code to perform other instance creation tasks here.
} protected override void Dispose(bool disposing)
{
if(disposing)
{
if (license != null)
{
license.Dispose();
license = null;
}
}
}}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货