MONSTER: Rename Monorepo to Modules, only keep Projects under Modules.*
This commit is contained in:
129
License/License.vbproj
Normal file
129
License/License.vbproj
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{5EBACBFA-F11A-4BBF-8D02-91461F2293ED}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>DigitalData.Modules.License</RootNamespace>
|
||||
<AssemblyName>DigitalData.Modules.License</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>DigitalData.Modules.License.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>DigitalData.Modules.License.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="LicenseCreator.vb" />
|
||||
<Compile Include="LicenseFile.vb" />
|
||||
<Compile Include="LicenseLegacy.vb" />
|
||||
<Compile Include="LicenseManagerLegacy.vb" />
|
||||
<Compile Include="LicenseSchema.vb">
|
||||
<DependentUpon>LicenseSchema.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LicensesLegacy.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="LicenseSchema.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Logging\Logging.vbproj">
|
||||
<Project>{903b2d7d-3b80-4be9-8713-7447b704e1b0}</Project>
|
||||
<Name>Logging</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
34
License/LicenseCreator.vb
Normal file
34
License/LicenseCreator.vb
Normal file
@@ -0,0 +1,34 @@
|
||||
Public Class LicenseCreator
|
||||
Public Shared Function NewUser(Type As UserType, Count As Integer, Optional ValidUntil As Date = Nothing) As LicenseModuleUser
|
||||
Dim oValidUntilSpecified = Not IsNothing(ValidUntil)
|
||||
Dim oTest = IsNothing(ValidUntil)
|
||||
|
||||
Return New LicenseModuleUser() With {
|
||||
.Count = Count,
|
||||
.Type = Type,
|
||||
.Test = oTest,
|
||||
.ValidUntil = ValidUntil,
|
||||
.ValidUntilSpecified = oValidUntilSpecified
|
||||
}
|
||||
End Function
|
||||
|
||||
Public Shared Function NewModule(Name As String, Users As List(Of LicenseModuleUser), Optional ValidUntil As Date = Nothing) As LicenseModule
|
||||
Dim oUsers = Users.ToArray()
|
||||
Dim oValidUntilSpecified = Not IsNothing(ValidUntil)
|
||||
|
||||
Return New LicenseModule() With {
|
||||
.Name = Name,
|
||||
.Users = oUsers,
|
||||
.ValidUntil = ValidUntil,
|
||||
.ValidUntilSpecified = oValidUntilSpecified
|
||||
}
|
||||
End Function
|
||||
|
||||
Public Shared Function NewLicense(Modules As List(Of LicenseModule)) As LicenseSchema
|
||||
Dim oModules = Modules.ToArray()
|
||||
|
||||
Return New LicenseSchema With {
|
||||
.Modules = oModules
|
||||
}
|
||||
End Function
|
||||
End Class
|
||||
81
License/LicenseFile.vb
Normal file
81
License/LicenseFile.vb
Normal file
@@ -0,0 +1,81 @@
|
||||
Imports System.IO
|
||||
Imports System.Xml
|
||||
Imports System.Xml.Serialization
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class LicenseFile
|
||||
Public Const LICENSE_FILENAME = "License.xml"
|
||||
|
||||
Public ReadOnly Path As String
|
||||
Private _Logger As Logger
|
||||
|
||||
Public Sub New(LogConfig As LogConfig, Path As String)
|
||||
Me.Path = Path
|
||||
_Logger = LogConfig.GetLogger()
|
||||
End Sub
|
||||
|
||||
Private Function GetSerializer() As XmlSerializer
|
||||
Dim oSerializer As New XmlSerializer(GetType(LicenseSchema))
|
||||
Return oSerializer
|
||||
End Function
|
||||
|
||||
Public Function TestFileValid(Optional FileName As String = LICENSE_FILENAME) As Boolean
|
||||
Try
|
||||
Dim oSerializer = GetSerializer()
|
||||
Dim oFilePath As String = IO.Path.Combine(Path, FileName)
|
||||
|
||||
Using oReader As New StreamReader(oFilePath),
|
||||
oXmlReader = XmlReader.Create(oReader)
|
||||
Return oSerializer.CanDeserialize(oXmlReader)
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function LoadFile(Optional FileName As String = LICENSE_FILENAME) As LicenseSchema
|
||||
Try
|
||||
Dim oSerializer = GetSerializer()
|
||||
Dim oFilePath As String = IO.Path.Combine(Path, FileName)
|
||||
Dim oLicense As LicenseSchema
|
||||
|
||||
Using oReader As New StreamReader(oFilePath)
|
||||
oLicense = oSerializer.Deserialize(oReader)
|
||||
End Using
|
||||
|
||||
Return oLicense
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function Serialize(License As LicenseSchema) As Byte()
|
||||
Try
|
||||
Dim oSerializer = GetSerializer()
|
||||
|
||||
Using oStream = New MemoryStream()
|
||||
oSerializer.Serialize(oStream, License)
|
||||
Return oStream.ToArray()
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Sub SaveFile(License As LicenseSchema, Optional FileName As String = LICENSE_FILENAME)
|
||||
Try
|
||||
Dim oBytes = Serialize(License)
|
||||
Dim oFilePath As String = IO.Path.Combine(Path, FileName)
|
||||
|
||||
Using oFileStream = New FileStream(oFilePath, FileMode.Create, FileAccess.Write)
|
||||
oFileStream.Write(oBytes, 0, oBytes.Length)
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
44
License/LicenseLegacy.vb
Normal file
44
License/LicenseLegacy.vb
Normal file
@@ -0,0 +1,44 @@
|
||||
Public Class LicenseLegacy
|
||||
' ++++++++++++++++++++++++++++++++++++++++++++++ Methoden ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
''' <summary>
|
||||
''' Konstruktor der Lizenz
|
||||
''' </summary>
|
||||
Sub New(ByVal _ModuleName As String, ByVal _Expires As Date, ByVal _Type As String, ByVal _AnzProfile As String)
|
||||
Modulename = _ModuleName
|
||||
Expires = _Expires
|
||||
Type = _Type
|
||||
Anz_Profile = _AnzProfile
|
||||
End Sub
|
||||
|
||||
' ++++++++++++++++++++++++++++++++++++++++++++++ Properties ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
''' <summary>
|
||||
''' Liefert oder setzt den Namen des Moduls für diese Lizenz
|
||||
''' </summary>
|
||||
Public Property Modulename() As String
|
||||
''' <summary>
|
||||
''' Liefert oder setzt das Gültigkeitsdatum der Lizenz für das Modul
|
||||
''' </summary>
|
||||
Public Property Expires() As Date
|
||||
''' <summary>
|
||||
''' Liefert den Typen der Lizenz
|
||||
''' </summary>
|
||||
Public Property Type() As String
|
||||
''' <summary>
|
||||
''' Liefert die Anzahl der Profile
|
||||
''' </summary>
|
||||
Public Property Anz_Profile() As String
|
||||
''' <summary>
|
||||
''' Liefert ob die Lizenz schon abgelaufen ist
|
||||
''' </summary>
|
||||
Public ReadOnly Property IsExpired()
|
||||
Get
|
||||
If Date.Today > Expires Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
228
License/LicenseManagerLegacy.vb
Normal file
228
License/LicenseManagerLegacy.vb
Normal file
@@ -0,0 +1,228 @@
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.Text
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class LicenseManagerLegacy
|
||||
Public Shared _licenses As LicensesLegacy
|
||||
Private _Logger As Logger
|
||||
Private _LogConfig As LogConfig
|
||||
|
||||
Public LicenseString As String
|
||||
Public LicenseStringArray(,) As String
|
||||
|
||||
' ++++++++++++++++++++++++++++++++++++++++++++++ Methoden ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
''' <summary>
|
||||
''' Konstruktor für den Lizenz-Manager
|
||||
''' </summary>
|
||||
''' <param name="_Password">Passwort zum Entschlüsseln des Lizenzkeys</param>
|
||||
''' <param name="_Key">verschlüsselter Lizenzkey</param>
|
||||
''' <remarks></remarks>
|
||||
Sub New(LogConfig As LogConfig, ByVal _Password As String, ByVal _Key As String)
|
||||
_LogConfig = LogConfig
|
||||
_Logger = LogConfig.GetLogger
|
||||
|
||||
Password = _Password
|
||||
Key = _Key
|
||||
|
||||
LicenseString = DecodeLicenseKey(Key)
|
||||
LicenseStringArray = SplitLicenseString(LicenseString)
|
||||
|
||||
LoadLicenses()
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Konstruktor für den Lizenz-Manager ohne License load
|
||||
''' </summary>
|
||||
''' <param name="password">Passwort zum Entschlüsseln des Lizenzkeys</param>
|
||||
Sub New(ByVal password As String)
|
||||
Me.Password = password
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' Lädt alle Lizenzen aus dem Lizenz-Array
|
||||
''' </summary>
|
||||
''' <remarks></remarks>
|
||||
Public Sub LoadLicenses()
|
||||
_licenses = New LicensesLegacy(_LogConfig, LicenseStringArray)
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Codiert eine Zeichenkette
|
||||
''' </summary>
|
||||
''' <param name="str">zu verschlüsselnde Zeichenkette</param>
|
||||
''' <param name="password">das zur Verschlüsselung verwendete Passwort</param>
|
||||
''' <returns>liefert eine verschlüsselte Zeichenkette</returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function EncodeLicenseKey(ByVal str As String, ByVal password As String)
|
||||
Dim oRijndael As New RijndaelManaged
|
||||
|
||||
Dim oMD5 As New MD5CryptoServiceProvider
|
||||
Dim oKey() As Byte = oMD5.ComputeHash(Encoding.UTF8.GetBytes(password))
|
||||
|
||||
oMD5.Clear()
|
||||
oRijndael.Key = oKey
|
||||
oRijndael.GenerateIV()
|
||||
|
||||
Dim oInitialVector() As Byte = oRijndael.IV
|
||||
Dim oStream As New IO.MemoryStream
|
||||
|
||||
oStream.Write(oInitialVector, 0, oInitialVector.Length)
|
||||
|
||||
Dim oCryptoStream As New CryptoStream(oStream, oRijndael.CreateEncryptor, CryptoStreamMode.Write)
|
||||
Dim oData() As Byte = Encoding.UTF8.GetBytes(str)
|
||||
|
||||
oCryptoStream.Write(oData, 0, oData.Length)
|
||||
oCryptoStream.FlushFinalBlock()
|
||||
|
||||
Dim oEncodedData() As Byte = oStream.ToArray()
|
||||
Dim oResult As String = Convert.ToBase64String(oEncodedData)
|
||||
oCryptoStream.Close()
|
||||
oRijndael.Clear()
|
||||
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Decodiert den verschlüsselten Lizenzkey
|
||||
''' </summary>
|
||||
''' <param name="licenseCodeStr">verschlüsselter Lizenzkey</param>
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function DecodeLicenseKey(ByVal licenseCodeStr As String)
|
||||
Try
|
||||
Dim oRijndael As New RijndaelManaged
|
||||
Dim oIVLength As Integer = 16
|
||||
Dim oMD5 As New MD5CryptoServiceProvider
|
||||
Dim oKey() As Byte = oMD5.ComputeHash(Encoding.UTF8.GetBytes(Me.Password))
|
||||
|
||||
oMD5.Clear()
|
||||
|
||||
Dim oEncodedData() As Byte
|
||||
Dim oStream
|
||||
Dim oInitialVector(15) As Byte
|
||||
Dim oCryptoStream As CryptoStream
|
||||
Dim oData() As Byte
|
||||
|
||||
Try
|
||||
oEncodedData = Convert.FromBase64String(licenseCodeStr)
|
||||
oStream = New IO.MemoryStream(oEncodedData)
|
||||
|
||||
oStream.Read(oInitialVector, 0, oIVLength)
|
||||
oRijndael.IV = oInitialVector
|
||||
oRijndael.Key = oKey
|
||||
|
||||
oCryptoStream = New CryptoStream(oStream, oRijndael.CreateDecryptor, CryptoStreamMode.Read)
|
||||
|
||||
ReDim oData(oStream.Length - oIVLength)
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
Dim oInteger As Integer = 0
|
||||
|
||||
Try
|
||||
oInteger = oCryptoStream.Read(oData, 0, oData.Length)
|
||||
Dim oResult As String = Encoding.UTF8.GetString(oData, 0, oInteger)
|
||||
|
||||
oCryptoStream.Close()
|
||||
oRijndael.Clear()
|
||||
Return oResult
|
||||
|
||||
Catch ex As Exception
|
||||
' Falsches Passwort
|
||||
_Logger.Warn("DecodeLicenseKey: Password Incorrect")
|
||||
_Logger.Error(ex)
|
||||
|
||||
Return Nothing
|
||||
|
||||
End Try
|
||||
Catch ex As Exception
|
||||
' Falsches Passwort
|
||||
_Logger.Warn("DecodeLicenseKey: Password Incorrect")
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Zerlegt den entschlüsselten Lizenzkey
|
||||
''' </summary>
|
||||
''' <param name="licenseStr">entschlüsselter Lizenzkey</param>
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public Function SplitLicenseString(ByVal licenseStr As String) As String(,)
|
||||
|
||||
Try
|
||||
If licenseStr IsNot Nothing Then
|
||||
Dim licenseTemp() As String = licenseStr.Split(";")
|
||||
|
||||
Dim licenses(licenseTemp.Length, 3) As String
|
||||
|
||||
Dim i As Integer = 0
|
||||
|
||||
If licenseTemp IsNot Nothing Then
|
||||
For Each lizenz As String In licenseTemp
|
||||
|
||||
Dim temp() = lizenz.Split(":")
|
||||
|
||||
licenses(i, 0) = temp(0)
|
||||
licenses(i, 1) = temp(1)
|
||||
If temp.Length > 2 Then
|
||||
licenses(i, 2) = temp(2)
|
||||
licenses(i, 3) = temp(3)
|
||||
Dim expires As Date
|
||||
Date.TryParse(licenses(i, 1), expires)
|
||||
End If
|
||||
|
||||
|
||||
i += 1
|
||||
Next
|
||||
|
||||
Return licenses
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Warn("Error in SplitLicenseString")
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
' ++++++++++++++++++++++++++++++++++++++++++++++ Properties ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
''' <summary>
|
||||
''' Liefert das Passwort zum Entschlüsseln des Lizenzschlüssels
|
||||
''' </summary>
|
||||
''' <value></value>
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public ReadOnly Property Password() As String
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Liefert eine Sammlung von Lizenzobjekten
|
||||
''' </summary>
|
||||
''' <value></value>
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public ReadOnly Property Licenses() As LicensesLegacy
|
||||
Get
|
||||
Return _licenses
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Liefert oder setzt den Lizenzschlüssel
|
||||
''' </summary>
|
||||
''' <value></value>
|
||||
''' <returns></returns>
|
||||
''' <remarks></remarks>
|
||||
Public Property Key() As String
|
||||
End Class
|
||||
203
License/LicenseSchema.vb
Normal file
203
License/LicenseSchema.vb
Normal file
@@ -0,0 +1,203 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict Off
|
||||
Option Explicit On
|
||||
|
||||
Imports System.Xml.Serialization
|
||||
Imports System.ComponentModel
|
||||
Imports System.CodeDom.Compiler
|
||||
|
||||
'
|
||||
'This source code was auto-generated by xsd, Version=4.6.1586.0.
|
||||
'
|
||||
|
||||
'''<remarks/>
|
||||
<GeneratedCode("xsd", "4.6.1586.0"),
|
||||
Serializable(),
|
||||
DebuggerStepThrough(),
|
||||
DesignerCategory("code"),
|
||||
XmlType(AnonymousType:=True, [Namespace]:="http://tempuri.org/LicenseSchema.xsd"),
|
||||
XmlRoot([Namespace]:="http://tempuri.org/LicenseSchema.xsd", IsNullable:=False, ElementName:="License")>
|
||||
Partial Public Class LicenseSchema
|
||||
|
||||
Private modulesField() As LicenseModule
|
||||
|
||||
'''<remarks/>
|
||||
<XmlArrayItemAttribute("Module", IsNullable:=False)>
|
||||
Public Property Modules() As LicenseModule()
|
||||
Get
|
||||
Return Me.modulesField
|
||||
End Get
|
||||
Set
|
||||
Me.modulesField = Value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
'''<remarks/>
|
||||
<GeneratedCode("xsd", "4.6.1586.0"),
|
||||
Serializable(),
|
||||
DebuggerStepThrough(),
|
||||
DesignerCategory("code"),
|
||||
XmlType(AnonymousType:=True, [Namespace]:="http://tempuri.org/LicenseSchema.xsd")>
|
||||
Partial Public Class LicenseModule
|
||||
|
||||
Private usersField() As LicenseModuleUser
|
||||
|
||||
Private nameField As String
|
||||
|
||||
Private validUntilField As Date
|
||||
|
||||
Private validUntilFieldSpecified As Boolean
|
||||
|
||||
'''<remarks/>
|
||||
<XmlArrayItem("User", IsNullable:=False)>
|
||||
Public Property Users() As LicenseModuleUser()
|
||||
Get
|
||||
Return Me.usersField
|
||||
End Get
|
||||
Set
|
||||
Me.usersField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<XmlAttribute()>
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return Me.nameField
|
||||
End Get
|
||||
Set
|
||||
Me.nameField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<XmlAttribute(DataType:="date")>
|
||||
Public Property ValidUntil() As Date
|
||||
Get
|
||||
Return Me.validUntilField
|
||||
End Get
|
||||
Set
|
||||
Me.validUntilField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<XmlIgnoreAttribute()>
|
||||
Public Property ValidUntilSpecified() As Boolean
|
||||
Get
|
||||
Return Me.validUntilFieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.validUntilFieldSpecified = Value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
'''<remarks/>
|
||||
<GeneratedCode("xsd", "4.6.1586.0"),
|
||||
Serializable(),
|
||||
DebuggerStepThrough(),
|
||||
DesignerCategory("code"),
|
||||
XmlType(AnonymousType:=True, [Namespace]:="http://tempuri.org/LicenseSchema.xsd")>
|
||||
Partial Public Class LicenseModuleUser
|
||||
|
||||
Private typeField As UserType
|
||||
|
||||
Private countField As String
|
||||
|
||||
Private testField As Boolean
|
||||
|
||||
Private validUntilField As Date
|
||||
|
||||
Private validUntilFieldSpecified As Boolean
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New
|
||||
Me.testField = True
|
||||
End Sub
|
||||
|
||||
'''<remarks/>
|
||||
<XmlAttribute()>
|
||||
Public Property Type() As UserType
|
||||
Get
|
||||
Return Me.typeField
|
||||
End Get
|
||||
Set
|
||||
Me.typeField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<XmlAttribute(DataType:="integer")>
|
||||
Public Property Count() As String
|
||||
Get
|
||||
Return Me.countField
|
||||
End Get
|
||||
Set
|
||||
Me.countField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<XmlAttribute(),
|
||||
DefaultValue(True)>
|
||||
Public Property Test() As Boolean
|
||||
Get
|
||||
Return Me.testField
|
||||
End Get
|
||||
Set
|
||||
Me.testField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<XmlAttribute(DataType:="date")>
|
||||
Public Property ValidUntil() As Date
|
||||
Get
|
||||
Return Me.validUntilField
|
||||
End Get
|
||||
Set
|
||||
Me.validUntilField = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<remarks/>
|
||||
<XmlIgnore()>
|
||||
Public Property ValidUntilSpecified() As Boolean
|
||||
Get
|
||||
Return Me.validUntilFieldSpecified
|
||||
End Get
|
||||
Set
|
||||
Me.validUntilFieldSpecified = Value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
'''<remarks/>
|
||||
<GeneratedCode("xsd", "4.6.1586.0"),
|
||||
Serializable(),
|
||||
XmlType([Namespace]:="http://tempuri.org/LicenseSchema.xsd")>
|
||||
Public Enum UserType
|
||||
|
||||
'''<remarks/>
|
||||
PowerUser
|
||||
|
||||
'''<remarks/>
|
||||
[ReadOnly]
|
||||
|
||||
'''<remarks/>
|
||||
[WriteOnly]
|
||||
|
||||
'''<remarks/>
|
||||
ReadWrite
|
||||
End Enum
|
||||
51
License/LicenseSchema.xsd
Normal file
51
License/LicenseSchema.xsd
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema id="LicenseSchema"
|
||||
targetNamespace="http://tempuri.org/LicenseSchema.xsd"
|
||||
elementFormDefault="qualified"
|
||||
xmlns="http://tempuri.org/LicenseSchema.xsd"
|
||||
xmlns:mstns="http://tempuri.org/LicenseSchema.xsd"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
>
|
||||
<xs:simpleType name="UserType">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="PowerUser" />
|
||||
<xs:enumeration value="ReadOnly" />
|
||||
<xs:enumeration value="WriteOnly" />
|
||||
<xs:enumeration value="ReadWrite" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
<xs:element name="License">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Modules">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Module" maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Users">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="User" maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:attribute type="UserType" name="Type" use="required"/>
|
||||
<xs:attribute type="xs:integer" name="Count" use="required"/>
|
||||
<xs:attribute type="xs:boolean" name="Test" use="optional" default="true"/>
|
||||
<xs:attribute type="xs:date" name="ValidUntil" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
<xs:attribute type="xs:string" name="Name" use="required"/>
|
||||
<xs:attribute type="xs:date" name="ValidUntil" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
104
License/LicensesLegacy.vb
Normal file
104
License/LicensesLegacy.vb
Normal file
@@ -0,0 +1,104 @@
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class LicensesLegacy
|
||||
Private _licenses() As LicenseLegacy
|
||||
Private _WDLizenz As String
|
||||
Private _Logger As Logger
|
||||
|
||||
' ++++++++++++++++++++++++++++++++++++++++++++++ Methoden ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
''' <summary>
|
||||
''' Konstruktor für die Lizenzen-Sammlung
|
||||
''' </summary>
|
||||
''' <param name="licenseStringArray">In Array übertragene Lizenzinformationen</param>
|
||||
Sub New(LogConfig As LogConfig, ByVal licenseStringArray(,) As String)
|
||||
Try
|
||||
_Logger = LogConfig.GetLogger()
|
||||
|
||||
If licenseStringArray IsNot Nothing Then
|
||||
Dim license1() As String = licenseStringArray(0, 1).Split("#")
|
||||
|
||||
If license1.Length > 1 Then
|
||||
Me.machine = license1(1)
|
||||
Else
|
||||
Me.machine = "all"
|
||||
End If
|
||||
Me.Company = license1(0) 'licenseStringArray(0, 1)
|
||||
Dim i As Integer
|
||||
For i = 1 To licenseStringArray.GetLength(0) - 2 ' minus 2, weil GetLength nicht null-basiert ist und das erste Element Firma ist
|
||||
Dim anzprof As String = licenseStringArray(i, 3)
|
||||
If anzprof.ToLower = "unlimited" Then
|
||||
anzprof = 99
|
||||
End If
|
||||
Me.Add(licenseStringArray(i, 0), licenseStringArray(i, 1), licenseStringArray(i, 2), anzprof)
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Fügt der Lizenz-Sammlung eine Lizenz hinzu
|
||||
''' </summary>
|
||||
''' <param name="modulename">Name des Moduls, für das eine Lizenz angelegt werden soll</param>
|
||||
''' <param name="expires">Datum der Gültigkeit der Lizenz</param>
|
||||
Public Sub Add(ByVal modulename As String, ByVal expires As Date, ByVal type As String, ByVal anzprof As String)
|
||||
|
||||
If _licenses IsNot Nothing Then
|
||||
ReDim Preserve _licenses(_licenses.Length)
|
||||
Else
|
||||
ReDim Preserve _licenses(0)
|
||||
End If
|
||||
|
||||
_licenses(_licenses.Length - 1) = New LicenseLegacy(modulename, expires, type, anzprof)
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Liefert eine Lizenz an Hand des Modulnamens
|
||||
''' </summary>
|
||||
''' <param name="modulename">Name des zu suchenden Moduls</param>
|
||||
''' <returns>liefert ein Lizenzobjekt</returns>
|
||||
Public Function GetLicense(ByVal modulename As String) As LicenseLegacy
|
||||
If _licenses IsNot Nothing Then
|
||||
For Each license As LicenseLegacy In _licenses
|
||||
If license.Modulename = modulename Then
|
||||
Return license
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' ++++++++++++++++++++++++++++++++++++++++++++++ Properties ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
''' <summary>
|
||||
''' liefert eine Sammlung von Lizenzobjekten
|
||||
''' </summary>
|
||||
Public ReadOnly Property Licenses() As LicenseLegacy()
|
||||
Get
|
||||
Return _licenses
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' liefert eine Lizenz an Hand des Modulnamens
|
||||
''' </summary>
|
||||
''' <param name="modulename">Name des zu suchenden Moduls</param>
|
||||
Public ReadOnly Property License(ByVal modulename As String) As LicenseLegacy
|
||||
Get
|
||||
Return GetLicense(modulename)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' Liefert oder setzt den Firmennamen des Lizenzeigentümers
|
||||
''' </summary>
|
||||
Public Property Company() As String
|
||||
Public Property machine() As String
|
||||
End Class
|
||||
13
License/My Project/Application.Designer.vb
generated
Normal file
13
License/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
10
License/My Project/Application.myapp
Normal file
10
License/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>1</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
License/My Project/AssemblyInfo.vb
Normal file
35
License/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
' die einer Assembly zugeordnet sind.
|
||||
|
||||
' Werte der Assemblyattribute überprüfen
|
||||
|
||||
<Assembly: AssemblyTitle("Modules.License")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("Modules.License")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2019")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||
<Assembly: Guid("4ae0298e-6136-4486-ad83-a5287a474d2b")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
' Hauptversion
|
||||
' Nebenversion
|
||||
' Buildnummer
|
||||
' Revision
|
||||
'
|
||||
' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
63
License/My Project/Resources.Designer.vb
generated
Normal file
63
License/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
'-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
'''<summary>
|
||||
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("DigitalData.Modules.License.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
License/My Project/Resources.resx
Normal file
117
License/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
73
License/My Project/Settings.Designer.vb
generated
Normal file
73
License/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "Automatische My.Settings-Speicherfunktion"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.DigitalData.Modules.License.My.MySettings
|
||||
Get
|
||||
Return Global.DigitalData.Modules.License.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
7
License/My Project/Settings.settings
Normal file
7
License/My Project/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
4
License/packages.config
Normal file
4
License/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="NLog" version="4.7.15" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user