diff --git a/app/TaskFlow/ClassInit.vb b/app/TaskFlow/ClassInit.vb index cb24f80..9108752 100644 --- a/app/TaskFlow/ClassInit.vb +++ b/app/TaskFlow/ClassInit.vb @@ -5,6 +5,7 @@ Imports DigitalData.Modules.EDMI.API Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback Imports DigitalData.Modules.EDMI.API.Constants Imports DigitalData.Modules.Database +Imports System.Windows.Forms.VisualStyles.VisualStyleElement Public Class ClassInit Public _lizenzManager As ClassLicenseManager @@ -239,7 +240,21 @@ Public Class ClassInit If split.Length >= 2 Then LICENSE_VALID = True End If - Dim oLICDATE = CDate(split(1)) + Dim oLICDATE As Date + Try + oLICDATE = CDate(split(1)) + Catch ex As Exception + LOGGER.Warn($"Error Converting Value {split(1)} to DATE") + Try + Dim expenddt As Date = Date.ParseExact(split(1), "dd.MM.yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo) + oLICDATE = expenddt + Catch ex1 As Exception + LOGGER.Warn($"Second Error Converting DATE with ParseExact - Setting Date = Today") + oLICDATE = Now.Date + End Try + + End Try + If oLICDATE < CDate(Now) Then MsgBox("Your license has expired!" & vbNewLine & "Last valid date: " & split(1) & vbNewLine & "Please contact Your sysadmin", MsgBoxStyle.Exclamation) LICENSE_EXPIRED = True diff --git a/app/TaskFlow/My Project/AssemblyInfo.vb b/app/TaskFlow/My Project/AssemblyInfo.vb index 5d758e6..3b392cd 100644 --- a/app/TaskFlow/My Project/AssemblyInfo.vb +++ b/app/TaskFlow/My Project/AssemblyInfo.vb @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - +