本文整理匯總了VB.NET中System.ComponentModel.LicenseManager類的典型用法代碼示例。如果您正苦於以下問題:VB.NET LicenseManager類的具體用法?VB.NET LicenseManager怎麽用?VB.NET LicenseManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了LicenseManager類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: MyControl
' 導入命名空間
Imports System.ComponentModel
Imports System.Windows.Forms
' Adds the LicenseProviderAttribute to the control.
<LicenseProvider(GetType(LicFileLicenseProvider))> _
Public Class MyControl
Inherits Control
' Creates a new, null license.
Private license As License = Nothing
Public Sub New()
' Adds Validate to the control's constructor.
license = LicenseManager.Validate(GetType(MyControl), Me)
' Insert code to perform other instance creation tasks here.
End Sub
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If (license IsNot Nothing) Then
license.Dispose()
license = Nothing
End If
End If
End Sub
End Class