jj: License Module
This commit is contained in:
@@ -6,6 +6,7 @@ Imports EDMI_ClientSuite.ClassLayout
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Logging.LogConfig
|
||||
Imports DigitalData.Modules.License
|
||||
|
||||
Public Class frmMain
|
||||
Private _Logger As Logger
|
||||
@@ -129,21 +130,16 @@ Public Class frmMain
|
||||
Dim oModules As New List(Of LicenseModule)
|
||||
oModules.Add(oModule)
|
||||
|
||||
Dim oLicense = New License() With {
|
||||
Dim oLicense = New LicenseSchema() With {
|
||||
.Modules = oModules.ToArray
|
||||
}
|
||||
|
||||
Dim oSerializer As New Xml.Serialization.XmlSerializer(GetType(License))
|
||||
Dim oLicenseFile As New LicenseFile(My.LogConfig, "E:\")
|
||||
oLicenseFile.SaveFile(oLicense)
|
||||
|
||||
Using oStream = New FileStream("E:\license.xml", FileMode.Create)
|
||||
oSerializer.Serialize(oStream, oLicense)
|
||||
oStream.Flush()
|
||||
End Using
|
||||
Dim oSerializer As New Xml.Serialization.XmlSerializer(GetType(LicenseSchema))
|
||||
Dim oLicense2 As LicenseSchema
|
||||
|
||||
Dim oLicense2 As License
|
||||
|
||||
Using oReader As New StreamReader("E:\license.xml")
|
||||
oLicense2 = oSerializer.Deserialize(oReader)
|
||||
End Using
|
||||
oLicense2 = oLicenseFile.LoadFile()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user