Compare commits

...

7 Commits

Author SHA1 Message Date
OlgunR
2a4de5ddf8 2.10.4.0 - Refactor: remove license mgmt, add password crypto class
Replaced all license management classes (ClassLicense, ClassLicenses, ClassLicenseManager) with a new ClassPasswordCrypto for password encryption/decryption using Rijndael (AES). Updated all usages to call EncodePassword/DecodePassword instead of license key methods. Removed obsolete license-related code and files from the project. Incremented assembly version to 2.10.4.0. Cleaned up imports and updated the project file to reflect these changes. No license logic remains; only password crypto is handled.
2026-05-07 13:21:06 +02:00
OlgunR
de30e3198b 2.10.3.0 - Remove license management feature and UI
Removed all license management functionality, including the frmLizenzmanager form, related settings, and code references. Deleted the "licensekey" user setting and cleaned up associated logic in forms and the main menu. Updated assembly version to 2.10.3.0. No other functional changes were made.
2026-05-07 11:21:26 +02:00
OlgunR
320d65925b Remove license checks for Move and Rename module
Eliminated all dynamic license validation and management for the "Move and Rename" module. The feature is now always enabled regardless of license state. Cleaned up related variables, removed license manager initialization, and simplified module loading logic. Incremented version to 2.10.2.0.
2026-05-06 14:25:32 +02:00
OlgunR
7694da3192 Update AssemblyVersion to 2.10.1.0
Incremented the AssemblyVersion in AssemblyInfo.vb from 2.10.0.0 to 2.10.1.0 to reflect a minor version update. No other changes were made.
2026-04-30 14:24:07 +02:00
OlgunR
eb826009f8 Remove LICENSE_MoveRename check for grpbxMORE enable state
Removed logic that enabled or disabled the grpbxMORE group box based on the LICENSE_MoveRename variable. The group box's enabled state is no longer set by default or controlled by license checks. Also updated ImageList1.ImageStream in the resource file.
2026-04-30 14:23:28 +02:00
OlgunR
018cbc5ae0 Refactor session logout logic into helper method
Extracted duplicated session logout code into a new private method, LogoutCurrentSession. This method is now used in both GetWMSessionAsUser and GetWMSession to improve code reuse and maintainability. Exception handling for session logout remains silent to avoid issues with already-terminated sessions.
2026-04-29 15:47:04 +02:00
OlgunR
e4d6734b03 Improve session management and initialization logic
Refactored ClassWindream_allgemein to enhance session lifecycle handling and robustness. Now, after successful impersonation/login, session and object type variables are set and errors are logged if loading fails. Changed impersonation/login to return Boolean for clarity. Init() now returns session creation success. Added GetWMSession to properly reset sessions. Ensured object types are loaded when reusing sessions. These changes improve error handling and maintain consistent session state.
2026-04-27 16:44:00 +02:00
21 changed files with 80 additions and 1040 deletions

View File

@@ -1,7 +1,7 @@
Imports System.DirectoryServices
Imports DigitalData.Modules.Logging
Public Class ClassActiveDirectory
Public Shared licenseManager As ClassLicenseManager = Nothing
Public Shared passwordCrypto As ClassPasswordCrypto = Nothing
Public Shared ErgebnisAD As String()
Private Shared _Logger As DigitalData.Modules.Logging.Logger
Public Shared Function Test_Connect(SEARCH_Filter As String, Property2Load As String, Domain As String, User As String, PW As String)
@@ -95,8 +95,8 @@ Public Class ClassActiveDirectory
End If
licenseManager = New ClassLicenseManager("#DigitalData9731258!#")
Dim PWDecode As String = licenseManager.DecodeLicenseKey(PW)
passwordCrypto = New ClassPasswordCrypto("#DigitalData9731258!#")
Dim PWDecode As String = passwordCrypto.DecodePassword(PW)
Dim objDirectoryEntry As DirectoryEntry = New DirectoryEntry(Domain)
If PW <> String.Empty And User <> String.Empty Then
objDirectoryEntry.Username = User

View File

@@ -1,104 +0,0 @@
Public Class ClassLicense
Private _modulename As String
Private _expires As Date
Private _Typ As String
Private _anzProf As String
' ++++++++++++++++++++++++++++++++++++++++++++++ Methoden ++++++++++++++++++++++++++++++++++++++++++++++
''' <summary>
''' Konstruktor der Lizenz
''' </summary>
''' <param name="modulename">Name des Moduls</param>
''' <param name="expires">Gültigkeitsdatum der Lizenz</param>
''' <remarks></remarks>
Sub New(ByVal modulename As String, ByVal expires As Date, ByVal _type As String, ByVal _anzprofile As String)
Me._modulename = modulename
Me._expires = expires
Me._Typ = _type
Me._anzProf = _anzprofile
End Sub
' ++++++++++++++++++++++++++++++++++++++++++++++ Properties ++++++++++++++++++++++++++++++++++++++++++++++
''' <summary>
''' Liefert oder setzt den Namen des Moduls für diese Lizenz
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property Modulename() As String
Get
Return Me._modulename
End Get
Set(ByVal value As String)
Me._modulename = value
End Set
End Property
''' <summary>
''' Liefert oder setzt das Gültigkeitsdatum der Lizenz für das Modul
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property Expires() As Date
Get
Return Me._expires
End Get
Set(ByVal value As Date)
Me._expires = value
End Set
End Property
''' <summary>
''' Liefert ob die Lizenz schon abgelaufen ist
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property IsExpired()
Get
If Date.Today > Me._expires Then
Return True
Else
Return False
End If
End Get
End Property
''' <summary>
''' Liefert den Typend er Lizenz
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property Type() As String
Get
Return Me._Typ
End Get
Set(ByVal value As String)
Me._Typ = value
End Set
End Property
''' <summary>
''' Liefert die Anzahl der Profile
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property Anz_Profile() As String
Get
Return Me._anzProf
End Get
Set(ByVal value As String)
Me._anzProf = value
End Set
End Property
End Class

View File

@@ -1,149 +0,0 @@
Public Class ClassLicenses
Private _licenses() As ClassLicense
Private _machine As String
Private _company As String
Private _WDLizenz As String
' ++++++++++++++++++++++++++++++++++++++++++++++ Methoden ++++++++++++++++++++++++++++++++++++++++++++++
''' <summary>
''' Konstruktor für die Lizenzen-Sammlung
''' </summary>
''' <param name="licenseStringArray">In Array übertragene Lizenzinformationen</param>
''' <remarks></remarks>
Sub New(ByVal licenseStringArray(,) As String)
Try
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)
frmStart._company = Me._company
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 _date As Date
Dim anzprof As String = licenseStringArray(i, 3)
If anzprof.ToLower = "unlimited" Then
anzprof = 99
End If
Try
_date = CDate(licenseStringArray(i, 1))
Catch ex As Exception
If licenseStringArray(i, 1).ToString.EndsWith("2099") Then
_date = "2099-12-31"
Else
MsgBox(ex.Message & vbNewLine & Environment.OSVersion.ToString, MsgBoxStyle.Critical)
End If
End Try
Me.Add(licenseStringArray(i, 0), _date, licenseStringArray(i, 2), anzprof)
Next
End If
Catch ex As Exception
MsgBox("Fehler bei Auslesen der Licenses: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
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>
''' <remarks></remarks>
Public Sub Add(ByVal modulename As String, ByVal expires As Date, ByVal type As String, ByVal anzprof As String)
If Me._licenses IsNot Nothing Then
ReDim Preserve Me._licenses(Me._licenses.Length)
Else
ReDim Preserve Me._licenses(0)
End If
Me._licenses(Me._licenses.Length - 1) = New ClassLicense(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>
''' <remarks></remarks>
Public Function GetLicense(ByVal modulename As String) As ClassLicense
If Me._licenses IsNot Nothing Then
For Each license As ClassLicense In Me._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>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property Licenses() As ClassLicense()
Get
Return Me._licenses
End Get
End Property
''' <summary>
''' liefert eine Lizenz an Hand des Modulnamens
''' </summary>
''' <param name="modulename">Name des zu suchenden Moduls</param>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property License(ByVal modulename As String) As ClassLicense
Get
Return Me.GetLicense(modulename)
End Get
End Property
''' <summary>
''' Liefert oder setzt den Firmennamen des Lizenzeigentümers
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property Company() As String
Get
Return Me._company
End Get
Set(ByVal value As String)
Me._company = value
End Set
End Property
Public Property machine() As String
Get
Return Me._machine
End Get
Set(ByVal value As String)
Me._machine = value
End Set
End Property
End Class

View File

@@ -1,34 +1,26 @@
Imports System.Text
Imports System.Security.Cryptography
Imports System.Collections.ObjectModel
Imports System.Security.Cryptography
Imports System.Text
Public Class ClassLicenseManager
Public Class ClassPasswordCrypto
Private _password As String
Private _key As String
Public Shared _licenses As ClassLicenses
Public licenseString As String
Public licenseStringArray(,) As String
' ++++++++++++++++++++++++++++++++++++++++++++++ Properties ++++++++++++++++++++++++++++++++++++++++++++++
''' <summary>
''' Liefert das Passwort zum Entschlüsseln des Lizenzschlüssels
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property Password() As String
Get
Return Me._password
End Get
End Property
' ++++++++++++++++++++++++++++++++++++++++++++++ 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(ByVal password As String, ByVal key As String)
Me._password = password
Me._key = key
Me.licenseString = Me.DecodeLicenseKey(Me._key)
Me.licenseStringArray = Me.SplitLicenseString(Me.licenseString)
Me.LoadLicenses()
End Sub
''' <summary>
''' Konstruktor für den Lizenz-Manager ohne License load
''' </summary>
@@ -37,14 +29,6 @@ Public Class ClassLicenseManager
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()
ClassLicenseManager._licenses = New ClassLicenses(Me.licenseStringArray)
End Sub
''' <summary>
''' Codiert eine Zeichenkette
@@ -53,7 +37,7 @@ Public Class ClassLicenseManager
''' <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)
Public Function EncodePassword(ByVal str As String, ByVal password As String)
Dim rd As New RijndaelManaged
Dim md5 As New MD5CryptoServiceProvider
@@ -69,7 +53,7 @@ Public Class ClassLicenseManager
ms.Write(iv, 0, iv.Length)
Dim cs As New CryptoStream(ms, rd.CreateEncryptor, CryptoStreamMode.Write)
Dim data() As Byte = System.Text.Encoding.UTF8.GetBytes(Str)
Dim data() As Byte = System.Text.Encoding.UTF8.GetBytes(str)
cs.Write(data, 0, data.Length)
cs.FlushFinalBlock()
@@ -82,14 +66,13 @@ Public Class ClassLicenseManager
Return result
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)
Public Function DecodePassword(ByVal licenseCodeStr As String)
Try
Dim rd As New RijndaelManaged
Dim rijndaelIvLength As Integer = 16
@@ -121,7 +104,6 @@ Public Class ClassLicenseManager
Dim i As Integer = 0
Try
i = cs.Read(data, 0, data.Length)
@@ -143,95 +125,4 @@ Public Class ClassLicenseManager
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
MsgBox("Fehler in SplitLicenseString: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
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
Get
Return Me._password
End Get
End Property
''' <summary>
''' Liefert eine Sammlung von Lizenzobjekten
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public ReadOnly Property Licenses() As ClassLicenses
Get
Return ClassLicenseManager._licenses
End Get
End Property
''' <summary>
''' Liefert oder setzt den Lizenzschlüssel
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property Key() As String
Get
Return Me._key
End Get
Set(ByVal value As String)
Me._key = value
End Set
End Property
End Class

View File

@@ -49,7 +49,20 @@ Public Class ClassWindream_allgemein
' Process.GetCurrentProcess.Kill()
End If
End Sub
Private Sub LogoutCurrentSession()
If Not IsNothing(CURRENToWMSession) Then
Try
CURRENToWMSession.Logout()
Catch
' ignorieren Session war evtl. schon tot
End Try
CURRENToWMSession = Nothing
End If
End Sub
Public Function GetWMSessionAsUser(Domain, ServerName, UserName, Password)
LogoutCurrentSession()
Dim SessionAsUser
Dim aConnect, aUserId, aSession
On Error Resume Next
@@ -95,10 +108,24 @@ Public Class ClassWindream_allgemein
SessionAsUser = aSession
If aSession.aLoggedin = True Then
_Logger.Debug($"#Impersonate login [{UserName}] successfull!")
Return SessionAsUser
Me.oWMSession = aSession
CURRENToWMSession = aSession
CURRENToWMSession_Created = Now
Me.oObjekttypen = aSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument)
If Err.Number <> 0 Then
_Logger.Warn("Fehler beim Laden der Objekttypen nach Impersonate-Login: " & Err.Description)
Err.Clear()
End If
Me.oOrdnerTypen = aSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityFolder)
If Err.Number <> 0 Then
_Logger.Warn("Fehler beim Laden der Ordnertypen nach Impersonate-Login: " & Err.Description)
Err.Clear()
End If
Return True
End If
End If
Return False
End Function
''' <summary>
@@ -108,21 +135,29 @@ Public Class ClassWindream_allgemein
''' <remarks></remarks>
Public Function Init() As Boolean
If IsNothing(CURRENToWMSession) OrElse Not IsLoggedIn() Then
If IsNothing(CURRENToWMSession) OrElse Not CBool(CURRENToWMSession.aLoggedin) Then
If WMLOGIN_DOMAIN <> String.Empty Then
GetWMSessionAsUser(WMLOGIN_DOMAIN, Me.GetCurrentServer, WMLOGIN_USER, WMLOGIN_PW)
Return GetWMSessionAsUser(WMLOGIN_DOMAIN, Me.GetCurrentServer, WMLOGIN_USER, WMLOGIN_PW)
Else
GetWMSession()
Return GetWMSession()
End If
Else
If My.Settings.vLogErrorsonly = False Then _Logger.Debug("WMSession already created!")
oWMSession = CURRENToWMSession
If IsNothing(oObjekttypen) Then
oObjekttypen = oWMSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityDocument)
End If
If IsNothing(oOrdnerTypen) Then
oOrdnerTypen = oWMSession.GetWMObjectTypes(WINDREAMLib.WMEntity.WMEntityFolder)
End If
Return True
End If
End Function
Private Function GetWMSession()
LogoutCurrentSession()
Try
Try
' Session-Objekt instanziieren und mit dem im Client ausgewählten Server belegen

View File

@@ -1,4 +1,3 @@
Module ModuleSettings
Public LICENSE_MoveRename As Boolean
Public LICENSE_AD As Boolean
End Module

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.10.0.0")>
<Assembly: AssemblyVersion("2.10.4.0")>
<Assembly: AssemblyFileVersion("2.9.9.0")>

View File

@@ -54,19 +54,6 @@ Namespace My
End Get
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute(""), _
Global.System.Configuration.SettingsManageabilityAttribute(Global.System.Configuration.SettingsManageability.Roaming)> _
Public Property licensekey() As String
Get
Return CType(Me("licensekey"),String)
End Get
Set
Me("licensekey") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False"), _

View File

@@ -2,9 +2,6 @@
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
<Profiles />
<Settings>
<Setting Name="licensekey" Roaming="true" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="DIDurchlaufRunning" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>

View File

@@ -191,9 +191,7 @@
<Compile Include="ClassDIRegel.vb" />
<Compile Include="ClassDIRegeln.vb" />
<Compile Include="ClassLDAP.vb" />
<Compile Include="ClassLicense.vb" />
<Compile Include="ClassLicenseManager.vb" />
<Compile Include="ClassLicenses.vb" />
<Compile Include="ClassPasswordCrypto.vb" />
<Compile Include="ClassLoggerDI.vb" />
<Compile Include="ClassLoggerService.vb" />
<Compile Include="ClassMI_Profile.vb" />
@@ -361,12 +359,6 @@
<Compile Include="frmNI_SQLTest.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmLizenzmanager.Designer.vb">
<DependentUpon>frmLizenzmanager.vb</DependentUpon>
</Compile>
<Compile Include="frmLizenzmanager.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmNIProfileigenschaften.Designer.vb">
<DependentUpon>frmNIProfileigenschaften.vb</DependentUpon>
</Compile>
@@ -508,9 +500,6 @@
<EmbeddedResource Include="frmNI_SQLTest.resx">
<DependentUpon>frmNI_SQLTest.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmLizenzmanager.resx">
<DependentUpon>frmLizenzmanager.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmNIProfileigenschaften.resx">
<DependentUpon>frmNIProfileigenschaften.vb</DependentUpon>
</EmbeddedResource>

View File

@@ -11,7 +11,8 @@
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="ToolCollection.My.MySettings.DDECMConString" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd;Encrypt=False" providerName="System.Data.SqlClient" />
<add name="ToolCollection.My.MySettings.DDECMConString" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd;Encrypt=False"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.diagnostics>
<sources>
@@ -35,9 +36,6 @@
</system.diagnostics>
<userSettings>
<ToolCollection.My.MySettings>
<setting name="licensekey" serializeAs="String">
<value />
</setting>
<setting name="DIDurchlaufRunning" serializeAs="String">
<value>False</value>
</setting>

View File

@@ -4,7 +4,6 @@ Imports System.IO
Public Class frmDIProfilEigenschaften
' entspricht dem, über die Toolbar-Combobox ausgewählten, Profil und enthält alle relevanten Informationen darüber
Private selectedProfile As ClassDIProfil
Private licenseManager As ClassLicenseManager
Dim Formloaded As Boolean = False
'Zum Speichern der Positionen
Dim _pos As Integer
@@ -28,14 +27,7 @@ Public Class frmDIProfilEigenschaften
' alle Profile in die Toolbar-Combobox eintragen
Me.LoadProfilesInCombobox()
Try
Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#", My.Settings.licensekey)
Me.licenseManager.licenseString = Me.licenseManager.DecodeLicenseKey(My.Settings.licensekey)
Me.licenseManager.licenseStringArray = Me.licenseManager.SplitLicenseString(Me.licenseManager.licenseString)
Me.licenseManager.LoadLicenses()
Catch ex As Exception
MsgBox("Fehler beim Laden der Lizenzen:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Public Sub ReDimEx(ByRef MyArray As Object, ByVal iDimX As Integer, ByVal iDimY As Integer)

View File

@@ -1,235 +0,0 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmLizenzmanager
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmLizenzmanager))
Me.txtKey = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.boxLicenseInfos = New System.Windows.Forms.GroupBox()
Me.txtmachine = New System.Windows.Forms.TextBox()
Me.Label4 = New System.Windows.Forms.Label()
Me.txtCompany = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.lvLicense = New System.Windows.Forms.ListView()
Me.clmModulname = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.clmGültigkeit = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.clmType = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.clmAnz = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
Me.btnOK = New System.Windows.Forms.Button()
Me.btnAbbrechen = New System.Windows.Forms.Button()
Me.Label5 = New System.Windows.Forms.Label()
Me.txtmachineOriginal = New System.Windows.Forms.TextBox()
Me.boxLicenseInfos.SuspendLayout()
Me.SuspendLayout()
'
'txtKey
'
Me.txtKey.Location = New System.Drawing.Point(15, 25)
Me.txtKey.Multiline = True
Me.txtKey.Name = "txtKey"
Me.txtKey.Size = New System.Drawing.Size(456, 123)
Me.txtKey.TabIndex = 0
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(12, 9)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(87, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Lizenzschlüssel:"
'
'boxLicenseInfos
'
Me.boxLicenseInfos.Controls.Add(Me.txtmachine)
Me.boxLicenseInfos.Controls.Add(Me.Label4)
Me.boxLicenseInfos.Controls.Add(Me.txtCompany)
Me.boxLicenseInfos.Controls.Add(Me.Label3)
Me.boxLicenseInfos.Controls.Add(Me.Label2)
Me.boxLicenseInfos.Controls.Add(Me.lvLicense)
Me.boxLicenseInfos.Location = New System.Drawing.Point(15, 154)
Me.boxLicenseInfos.Name = "boxLicenseInfos"
Me.boxLicenseInfos.Size = New System.Drawing.Size(456, 349)
Me.boxLicenseInfos.TabIndex = 2
Me.boxLicenseInfos.TabStop = False
Me.boxLicenseInfos.Text = "Lizenzinformationen"
'
'txtmachine
'
Me.txtmachine.BackColor = System.Drawing.SystemColors.Window
Me.txtmachine.Cursor = System.Windows.Forms.Cursors.Arrow
Me.txtmachine.Location = New System.Drawing.Point(15, 81)
Me.txtmachine.Name = "txtmachine"
Me.txtmachine.ReadOnly = True
Me.txtmachine.Size = New System.Drawing.Size(425, 22)
Me.txtmachine.TabIndex = 5
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(12, 62)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(130, 13)
Me.Label4.TabIndex = 4
Me.Label4.Text = "Lizensiert für ""machine"":"
'
'txtCompany
'
Me.txtCompany.BackColor = System.Drawing.SystemColors.Window
Me.txtCompany.Cursor = System.Windows.Forms.Cursors.Arrow
Me.txtCompany.Location = New System.Drawing.Point(15, 40)
Me.txtCompany.Name = "txtCompany"
Me.txtCompany.ReadOnly = True
Me.txtCompany.Size = New System.Drawing.Size(425, 22)
Me.txtCompany.TabIndex = 3
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(12, 24)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(100, 13)
Me.Label3.TabIndex = 2
Me.Label3.Text = "Lizenzeigentümer:"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(12, 106)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(113, 13)
Me.Label2.TabIndex = 1
Me.Label2.Text = "enthaltene Lizenzen:"
'
'lvLicense
'
Me.lvLicense.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.clmModulname, Me.clmGültigkeit, Me.clmType, Me.clmAnz})
Me.lvLicense.FullRowSelect = True
Me.lvLicense.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable
Me.lvLicense.HideSelection = False
Me.lvLicense.Location = New System.Drawing.Point(15, 122)
Me.lvLicense.Name = "lvLicense"
Me.lvLicense.Size = New System.Drawing.Size(425, 204)
Me.lvLicense.TabIndex = 0
Me.lvLicense.UseCompatibleStateImageBehavior = False
Me.lvLicense.View = System.Windows.Forms.View.Details
'
'clmModulname
'
Me.clmModulname.Text = "Modulname"
Me.clmModulname.Width = 150
'
'clmGültigkeit
'
Me.clmGültigkeit.Text = "Gültigkeitsdatum"
Me.clmGültigkeit.Width = 120
'
'clmType
'
Me.clmType.Text = "Type"
Me.clmType.Width = 70
'
'clmAnz
'
Me.clmAnz.Text = "Profile"
'
'btnOK
'
Me.btnOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnOK.Location = New System.Drawing.Point(315, 577)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(75, 23)
Me.btnOK.TabIndex = 3
Me.btnOK.Text = "OK"
Me.btnOK.UseVisualStyleBackColor = True
'
'btnAbbrechen
'
Me.btnAbbrechen.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnAbbrechen.Location = New System.Drawing.Point(396, 577)
Me.btnAbbrechen.Name = "btnAbbrechen"
Me.btnAbbrechen.Size = New System.Drawing.Size(75, 23)
Me.btnAbbrechen.TabIndex = 4
Me.btnAbbrechen.Text = "Abbrechen"
Me.btnAbbrechen.UseVisualStyleBackColor = True
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(12, 511)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(94, 13)
Me.Label5.TabIndex = 5
Me.Label5.Text = """machine-Name"":"
'
'txtmachineOriginal
'
Me.txtmachineOriginal.Location = New System.Drawing.Point(15, 527)
Me.txtmachineOriginal.Name = "txtmachineOriginal"
Me.txtmachineOriginal.ReadOnly = True
Me.txtmachineOriginal.Size = New System.Drawing.Size(285, 22)
Me.txtmachineOriginal.TabIndex = 6
'
'frmLizenzmanager
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(487, 605)
Me.Controls.Add(Me.txtmachineOriginal)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.btnAbbrechen)
Me.Controls.Add(Me.btnOK)
Me.Controls.Add(Me.boxLicenseInfos)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.txtKey)
Me.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmLizenzmanager"
Me.ShowInTaskbar = False
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
Me.Text = "Lizenzmanager"
Me.boxLicenseInfos.ResumeLayout(False)
Me.boxLicenseInfos.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents txtKey As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents boxLicenseInfos As System.Windows.Forms.GroupBox
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents lvLicense As System.Windows.Forms.ListView
Friend WithEvents txtCompany As System.Windows.Forms.TextBox
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents clmModulname As System.Windows.Forms.ColumnHeader
Friend WithEvents clmGültigkeit As System.Windows.Forms.ColumnHeader
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents btnAbbrechen As System.Windows.Forms.Button
Friend WithEvents txtmachine As System.Windows.Forms.TextBox
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents clmType As System.Windows.Forms.ColumnHeader
Friend WithEvents clmAnz As System.Windows.Forms.ColumnHeader
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents txtmachineOriginal As System.Windows.Forms.TextBox
End Class

View File

@@ -1,149 +0,0 @@
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
<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" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</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" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAAAAAAA
AAAAAAAA////AFu8aACc2acANoo6AH7IhQBLoFEAjdGWAG3EdgBPtVkAQJRFAFysYgBmtW0AUqdZAHTL
fgCV1Z4Ahc2NAGTBcQBVuWAAXrRlADuPQABFmUoAedCDAHbDfABivWsAVqtdAHnLhwB6xoEAmNiiAE+k
VQCCyokAcMd6AIrPkgBywHoASJxNAFi7ZABpwXIAYrhqAGa9bwA5jD0AUrddAFuxYwCQ0pkAacN3AD6S
QgB2zoEAXr1qAEKWRwByyXwAYL9tAJPUnACLz5UASZ5PAIPMiwB8x4MAWq9hAF27ZgBiwG8AiM+QAIDK
hwCW16EAU6laAFG2WwB4zYIAV61eAFO4XwBau2YAb8Z4AF+1ZwBlwnMAmdikAHzJhQBlv28AZsBxAGfC
cwA6jj8APJBBAI/RmABMoVIAeM+CAHXNgABWumEAc8p9AF2tYwBdvGkAX75sAGO5awBlvG4Am9mmAD2R
QgCT1Z0AQZZGAI3SlwCM0JUASJ1OAIrPlACLz5MAhs2OAITMjACDy4oAgcqIAFi6YwBxyXsAZbVsAGXB
cgA5jT0APpJDAJnYowCY16IAl9iiAJfXoQCLz5QAiM+RAIPKiQCAyogAVrlhAH7IhABZu2QAds6AAHvG
gQBzy30AXb1pAG3EdwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDR0GIgAAahQnBAAAAAAAN2FicU4AAC8bF2kAAAAAABNwcxBn
TjRTNndMAAAAAAAlMyAkYWJjZDh0CgAAAAAAVyUhYCNRQT4JOwsKWUsAAAAAVgdUQmUSKBhkBXQsAAAA
ACYqMS4CdVFINR5yWwAAH3pHMmg5VXlCOgxOXhUAAHhrbhorRRFKSW89AAAAAAB2WEZsPA8yTV1fQAAA
AAAAFi0OZkNuWlclRCkAAAAAAAAAAAAwbVwAAAAAAAAAAAAAAAAAPwMcCAAAAAAAAAAAAAAAAE9QUgAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AACDDwAAgw8AAIAPAACADwAAgAEAAOABAADgAQAAgAEAAIAP
AACADwAAgA8AAPj/AAD4fwAA+P8AAP//AAA=
</value>
</data>
</root>

View File

@@ -1,101 +0,0 @@
Public Class frmLizenzmanager
Private licenseKey_old As String
Private licenseManager As ClassLicenseManager = Nothing
Private Sub frmLizenzmanager_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#", My.Settings.licensekey)
Me.txtKey.Text = My.Settings.licensekey
Me.licenseKey_old = Me.txtKey.Text
Me.txtmachineOriginal.Text = My.Computer.Name
Me.CheckLicenseKey()
End Sub
Private Sub CheckLicenseKey()
Me.txtCompany.Text = ""
Me.txtmachine.Text = ""
Me.lvLicense.Items.Clear()
If Not Me.txtKey.Text = "" Then
If Me.txtKey.Text = "DD MaxLicense" Or Me.txtKey.Text.ToUpper = "DDALLIN" Then
Me.txtCompany.Text = "Digital Data"
Me.txtmachine.Text = "None"
Else
Me.licenseManager.licenseString = Me.licenseManager.DecodeLicenseKey(Me.txtKey.Text)
Me.licenseManager.licenseStringArray = Me.licenseManager.SplitLicenseString(Me.licenseManager.licenseString)
Me.licenseManager.LoadLicenses()
Dim i As Integer = 0
If Me.licenseManager.Licenses.Licenses IsNot Nothing Then
Me.txtCompany.Text = Me.licenseManager.Licenses.Company
Me.txtmachine.Text = Me.licenseManager.Licenses.machine
Me.lvLicense.Items.Clear()
For Each license As ClassLicense In Me.licenseManager.Licenses.Licenses()
Dim expires As String = license.Expires.Date
Dim type As String = license.Type
Dim anzProf As String = license.Anz_Profile
If anzProf = 99 Then
anzProf = "Unlimited"
End If
'Date.TryParse(expires, license.Expires)
If Not expires = "" Then
Me.lvLicense.Items.Add(license.Modulename)
' MsgBox(license.Modulename)
Dim test = Me.lvLicense.Items.Item(i)
Me.lvLicense.Items(i).SubItems.Add(expires)
lvLicense.Items(i).SubItems.Add(type)
lvLicense.Items(i).SubItems.Add(anzProf)
i += 1
End If
Next
End If
End If
End If
End Sub
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
If Not Me.licenseKey_old = Me.txtKey.Text Then
Dim result As MsgBoxResult = MsgBox("Sind sie sicher, dass der Lizenzschlüssel geändert werden soll?", MsgBoxStyle.YesNo, "Lizenzschlüssel wurde geändert")
If result = MsgBoxResult.Yes Then
My.Settings.licensekey = Me.txtKey.Text
My.Settings.Save()
End If
End If
If Not My.Settings.licensekey = "" Then
' alle vorhandenen Module laden
frmStart.LoadAllModules()
End If
Me.Close()
End Sub
Private Sub btnAbbrechen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAbbrechen.Click
Me.txtKey.Text = ""
Me.txtCompany.Text = ""
Me.lvLicense.Items.Clear()
frmStart.ClearGroupBoxes()
If Not My.Settings.licensekey = "" Then
' alle vorhandenen Module laden
frmStart.LoadAllModules()
End If
Me.Close()
End Sub
Private Sub txtKey_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtKey.TextChanged
Me.CheckLicenseKey()
End Sub
End Class

View File

@@ -44,7 +44,6 @@ Public Class frmNIHauptseite
Public debug As Boolean = True
Private Shared _Instance As frmNIHauptseite = Nothing
Private _validModules()
Private licenseManager As ClassLicenseManager = Nothing
Public Shared _windream As ClassWindream_allgemein
Private Const ConstWMEntityDocument = 1 ''WINDREAMLib.WMEntity.WMEntityDocument
Private _singleProfileRun As String = ""
@@ -197,44 +196,6 @@ Public Class frmNIHauptseite
' Return Nothing
' End Select
'End Function
'Public Sub LoadAllModules()
' Me._validModules = Nothing
' If Not My.Settings.licensekey = "" Then
' 'Me.licenseManager = New ClassLicenseManager = Nothing
' Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#", My.Settings.licensekey)
' Me.licenseManager.licenseString = Me.licenseManager.DecodeLicenseKey(My.Settings.licensekey)
' Me.licenseManager.licenseStringArray = Me.licenseManager.SplitLicenseString(Me.licenseManager.licenseString)
' Me.licenseManager.LoadLicenses()
' Dim i As Integer = 0
' If Me.licenseManager.Licenses.Licenses IsNot Nothing Then
' For Each license As ClassLicense In Me.licenseManager.Licenses.Licenses()
' Dim expires As String = license.Expires.Date
' If IsExpired(license.Expires.Date) = False Then
' ' MsgBox(license.Modulename & vbNewLine & expires)
' Select Case license.Modulename.ToUpper
' Case "MOVEANDRENAME"
' LICENSE_MoveRename = True
' _Logger.Info("LICENSE MoveandRename aktiv")
' End Select
' i += 1
' Else
' Select Case license.Modulename
' Case "MOVEANDRENAME"
' LICENSE_MoveRename = False
' End Select
' i += 1
' End If
' 'Date.TryParse(expires, license.Expires)
' Next
' End If
' End If
'End Sub
Private Function IsExpired(ByVal _Date As Date)
If Date.Today > _Date Then
Return True
@@ -1830,22 +1791,14 @@ Public Class frmNIHauptseite
End If
'Move and Rename ausführen
If LICENSE_MoveRename = True And Not oUnexpectedError And unvollstaendig = False Then
If Not oUnexpectedError And unvollstaendig = False Then
Dim swMoveandrename As New ClassStopwatch("MoveandRename")
oUnexpectedError = FNMoveRename(pMyWMDoc)
Dim msg1 = swMoveandrename.Done
If msg1 <> "" Then
Stopwatch1 += vbNewLine & $"{msg1}"
End If
Else
If LICENSE_MoveRename = True And oUnexpectedError = True Or unvollstaendig = True Then
_Logger.Info("MoveRename Yes but error_in_Indexierung = True Or unvollstaendig = True")
_Logger.Debug("MoveRename Yes but error_in_Indexierung = True Or unvollstaendig = True")
End If
End If
'Indexierung gegen die Indizes des Ordners

View File

@@ -1007,7 +1007,6 @@ Partial Class frmNIProfileigenschaften
'
Me.grpbxMORE.Controls.Add(Me.btnMoveRename)
Me.grpbxMORE.Controls.Add(Me.Label21)
Me.grpbxMORE.Enabled = False
Me.grpbxMORE.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.grpbxMORE.Location = New System.Drawing.Point(6, 104)
Me.grpbxMORE.Name = "grpbxMORE"

View File

@@ -161,7 +161,7 @@ einen Startindex erhält, der nicht in der Datenbank existiert. Diese Kennzeichn
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAK
CQAAAk1TRnQBSQFMAgEBAgEAAdgBAAHYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CQAAAk1TRnQBSQFMAgEBAgEAAeABAAHgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@@ -15,7 +15,7 @@ Public Class frmNIProfileigenschaften
' verhindert (wenn True) das _selectedProfile auf Nothing gesetzt wird, wenn das Panel auf visible = True gesetzt wird
Private _flagIgnoreVisibilityChanged As Boolean = False
Private Shared _Instance As frmNIProfileigenschaften = Nothing
Private licenseManager As ClassLicenseManager = Nothing
Private passwordCrypto As ClassPasswordCrypto = Nothing
Private INDEX_LIST As New List(Of String)
Private selectedProfile As ClassNIProfil
Public Shared Function Instance() As frmNIProfileigenschaften
@@ -39,14 +39,7 @@ Public Class frmNIProfileigenschaften
_windream = New ClassWindream_allgemein(_MyLogger)
' alle Profile in die Toolbar-Combobox eintragen
Me.LoadProfilesInCombobox()
Try
Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#", My.Settings.licensekey)
Me.licenseManager.licenseString = Me.licenseManager.DecodeLicenseKey(My.Settings.licensekey)
Me.licenseManager.licenseStringArray = Me.licenseManager.SplitLicenseString(Me.licenseManager.licenseString)
Me.licenseManager.LoadLicenses()
Catch ex As Exception
MsgBox("Fehler beim Laden der Lizenzen:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Public Sub ReDimEx(ByRef MyArray As Object, ByVal iDimX As Integer, ByVal iDimY As Integer)
@@ -442,8 +435,8 @@ Public Class frmNIProfileigenschaften
If _selectedProfile.Password <> "" And _selectedProfile.UserId <> "" Then
Me.chkbxUserIdent.Checked = False
Me.txtLDAP_User.Text = _selectedProfile.UserId
licenseManager = New ClassLicenseManager("#DigitalData9731258!#")
Dim PWDecode As String = licenseManager.DecodeLicenseKey(_selectedProfile.Password)
passwordCrypto = New ClassPasswordCrypto("#DigitalData9731258!#")
Dim PWDecode As String = passwordCrypto.DecodePassword(_selectedProfile.Password)
Me.txtLDAP_PW.Text = PWDecode
Else
Me.chkbxUserIdent.Checked = True
@@ -1109,11 +1102,6 @@ Public Class frmNIProfileigenschaften
End Sub
Private Sub frmNIProfileigenschaften_Load(sender As Object, e As EventArgs) Handles Me.Load
If LICENSE_MoveRename = True Then
grpbxMORE.Enabled = True
Else
grpbxMORE.Enabled = False
End If
If Me._selectedProfile Is Nothing Then
Me.pnlProfileigenschaften.Visible = False
Else
@@ -1170,8 +1158,8 @@ Public Class frmNIProfileigenschaften
Private Sub txtLDAP_PW_TextChanged(sender As Object, e As EventArgs) Handles txtLDAP_PW.TextChanged
If Me._selectedProfile IsNot Nothing Then
licenseManager = New ClassLicenseManager("#DigitalData9731258!#")
Dim encodePW As String = licenseManager.EncodeLicenseKey(txtLDAP_PW.Text, "#DigitalData9731258!#")
passwordCrypto = New ClassPasswordCrypto("#DigitalData9731258!#")
Dim encodePW As String = passwordCrypto.EncodePassword(txtLDAP_PW.Text, "#DigitalData9731258!#")
Me._selectedProfile.Password = encodePW
If Not Me._selectedProfile.Password = Me._selectedProfile.OriginalPassword Then
Me.btnSpeichern.Enabled = True

View File

@@ -4,7 +4,7 @@ Public Class frmNIProfilhinzufuegen
Private _oDokumentTypen As WINDREAMLib.WMObjects
Public Shared _windream As ClassWindream_allgemein
Private Shared _Instance As frmNIProfilhinzufuegen = Nothing
Private licenseManager As ClassLicenseManager = Nothing
Private passwordCrypto As ClassPasswordCrypto = Nothing
Public Shared Function Instance() As frmNIProfilhinzufuegen
@@ -138,8 +138,8 @@ Public Class frmNIProfilhinzufuegen
' Nachindexierung über AD
If Me.txtProfilname.Text <> "" And Me.cmbObjektTypen.SelectedIndex <> -1 And Me.txtWindreamSuche.Text <> "" Then
If chkbxUserIdent.Checked = False And txtLDAP_Domaene.Text <> "" And txtLDAP_PW.Text <> "" And txtLDAP_User.Text <> "" Then
Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#")
Dim key As String = licenseManager.EncodeLicenseKey(txtLDAP_PW.Text, "#DigitalData9731258!#")
Me.passwordCrypto = New ClassPasswordCrypto("#DigitalData9731258!#")
Dim key As String = passwordCrypto.EncodePassword(txtLDAP_PW.Text, "#DigitalData9731258!#")
' das Profil hinzufügen - AD MIT AUTH
ClassNIProfile.Add(Me.txtProfilname.Text, Me.cmbObjektTypen.SelectedItem, Me.txtWindreamSuche.Text, "activedirectory", "", "", txtLDAP_Domaene.Text, txtLDAP_User.Text, key, "", Me.cmbIndexValidierung.Text, "", 0, Me.chkbxGetOrdnerRechte.Checked, Me.cmbOrdnertyp.Text)
' und das Formular schließen

View File

@@ -1,29 +1,11 @@
Imports System.Collections.ObjectModel
Imports System.Reflection
Imports System.Globalization
Imports DigitalData.Modules.Logging
Imports System.IO
Imports DigitalData.Modules.Database
Imports System.IO
Imports System.Text.RegularExpressions
Imports System.ComponentModel
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Public Class frmStart
Private _MyLogger As LogConfig
Private Shared _Logger As DigitalData.Modules.Logging.Logger
Public _validModules()
Public _company As String
' Dim timediff As Integer = 0
Private licenseManager As ClassLicenseManager = Nothing
'Private Sub timUhrzeit_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timUhrzeit.Tick
' ' der Statusuhr die aktuelle Systemzeit zuweisen
' Me.Status_Clock.Text = CType(My.Computer.Clock.LocalTime, String)
' timediff += 1000
' If timediff >= 86400000 Then
' 'LogDateien-löschen
' Delete_LogFiles()
' End If
'End Sub
' CREATE INSTANCE
Private Shared _Instance As frmStart = Nothing
@@ -230,14 +212,6 @@ Public Class frmStart
End If
If Not My.Settings.licensekey = "" Then
' Lizenz-Manager initialisieren
Me.licenseManager = New ClassLicenseManager("#DigitalData9731258!#", My.Settings.licensekey)
' alle vorhandenen Module laden
Me.LoadAllModules()
End If
Catch ex As Exception
_Logger.Error(ex)
End Try
@@ -319,31 +293,11 @@ Public Class frmStart
Cursor = Cursors.Default
End Sub
Private Sub LizenzverwaltungToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
' Öffnet den Lizenz-Manager
frmLizenzmanager.ShowDialog()
End Sub
Public Sub ClearGroupBoxes()
Me.grbDI.Visible = False
Me.GBNachindexierung.Visible = False
Me.grbxMoRe.Visible = False
LICENSE_MoveRename = False
LICENSE_AD = False
End Sub
Public Sub LoadAllModules()
Me._validModules = Nothing
LICENSE_AD = True
LICENSE_MoveRename = True
End Sub
Private Function IsExpired(ByVal _Date As Date)
If Date.Today > _Date Then
Return True
Else
Return False
End If
End Function
Private Sub FMStart_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
TimerNIRestart.Start()
@@ -395,10 +349,6 @@ Public Class frmStart
frmabout.ShowDialog()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
'WMOLICLib.WMLicenser()
End Sub
Private Sub PasswortverwaltungToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PasswortverwaltungToolStripMenuItem.Click
frmPWChange.ShowDialog()
End Sub