3 Commits

Author SHA1 Message Date
Dario Sassi 49ba669707 LicenceManager :
- piccole correzioni
- aggiunta colonna scadenza licenza in SearchLicence.
2026-01-07 16:46:59 +01:00
Dario Sassi 2a56848505 LicenceManager 3.1a1 :
- aggiunta gestione versione 31
- sistemazioni per scadenza aggiornamenti.
2026-01-02 12:36:36 +01:00
Dario Sassi 6a440fa51d LicenseManager 2.7i1 :
- ricompilazione con nuova libreria MySql.Data ver. 9.4.0 (da scaricare con nuget).
2025-09-22 09:05:07 +02:00
12 changed files with 174 additions and 69 deletions
+1
View File
@@ -16,3 +16,4 @@
/bin
/obj
/.vs
/packages
+14 -2
View File
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
+53 -3
View File
@@ -9,7 +9,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>LicenseManager</RootNamespace>
<AssemblyName>LicenseManager</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<MyType>Custom</MyType>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
@@ -62,17 +62,63 @@
<ApplicationIcon>Resources\LogoLicenceManager.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>packages\BouncyCastle.Cryptography.2.5.1\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference>
<Reference Include="EgtUILib">
<HintPath>..\..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
</Reference>
<Reference Include="EgtWPFLib5">
<HintPath>..\..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath>
</Reference>
<Reference Include="MySql.Data">
<HintPath>..\..\EgtProg\LicenceManager\MySql.Data.dll</HintPath>
<Reference Include="Google.Protobuf, Version=3.30.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>packages\Google.Protobuf.3.30.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4, Version=1.3.8.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>packages\K4os.Compression.LZ4.1.3.8\lib\net462\K4os.Compression.LZ4.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.3.8.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>packages\K4os.Compression.LZ4.Streams.1.3.8\lib\net462\K4os.Compression.LZ4.Streams.dll</HintPath>
</Reference>
<Reference Include="K4os.Hash.xxHash, Version=1.0.8.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
<HintPath>packages\K4os.Hash.xxHash.1.0.8\lib\net462\K4os.Hash.xxHash.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=9.4.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>packages\MySql.Data.9.4.0\lib\net462\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.ConfigurationManager, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Configuration.ConfigurationManager.8.0.0\lib\net462\System.Configuration.ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Pipelines, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.IO.Pipelines.5.0.2\lib\net461\System.IO.Pipelines.dll</HintPath>
</Reference>
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
@@ -87,6 +133,9 @@
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="WindowsFormsIntegration" />
<Reference Include="ZstdSharp, Version=0.8.5.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
<HintPath>packages\ZstdSharp.Port.0.8.5\lib\net462\ZstdSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="Application.xaml">
@@ -265,6 +314,7 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
+2 -2
View File
@@ -137,8 +137,8 @@ Public Class MainWindowM
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(823, 19, 1, m_nKeyLevel) And
EgtGetKeyOptions(823, 19, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(823, 3101, 10, m_nKeyLevel) And
EgtGetKeyOptions(823, 3101, 10, m_nKeyOptions)
' Inizializzazione generale di EgtInterface
m_sLogFile = m_sTempDir & "\" & LOG_FILE_NAME
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & vbLf &
+23 -7
View File
@@ -226,13 +226,27 @@ Public Class Licence
Public ReadOnly Property ExpirationDate As Date
Get
If ProductVersion.Length > 3 Then
' Es. se ProductVersion = 2402 la licenza scade il 01/02/2023, dove 2023 è 24 + 1999
Dim nYear As Integer = CInt(ProductVersion.Substring(0, 2)) + 1999
Dim nMonth As Integer = CInt(ProductVersion.Substring(2, 2))
Return New Date(nYear, nMonth, 1)
Dim nYear As Integer = 2015
Dim nMonth As Integer = 12
Dim nVer As Integer = CInt(ProductVersion)
If nVer = 16 Then
nYear = 2017
ElseIf nVer = 18 Then
nYear = 2018
ElseIf nVer = 19 Then
nYear = 2019
ElseIf nVer = 21 Then
nYear = 2020
ElseIf nVer = 22 Then
nYear = 2021
ElseIf nVer >= 2201 And nVer <= 2712 Then
nYear = nVer \ 100 + 1999
nMonth = nVer Mod 100
ElseIf nVer >= 3101 And nVer <= 36812 Then
nYear = nVer \ 100 + 1996
nMonth = nVer Mod 100
End If
Return Nothing
Return New Date(nYear, nMonth, DateTime.DaysInMonth(nYear, nMonth))
End Get
End Property
@@ -250,7 +264,9 @@ Public Class Licence
End Get
End Property
Sub New(ProductID As Integer, ProductVersion As String, ProductLevel As Integer, ProductDeadline As Date, Option1 As Integer, Option2 As Integer, OptionDeadline As Date, LockID As String, File As String, LicenceID As String, LicenseDate As Date, LicFile As String, Note As String)
Sub New(ProductID As Integer, ProductVersion As String, ProductLevel As Integer, ProductDeadline As Date,
Option1 As Integer, Option2 As Integer, OptionDeadline As Date, LockID As String, File As String,
LicenceID As String, LicenseDate As Date, LicFile As String, Note As String)
m_ProductID = ProductID
m_ProductVersion = ProductVersion
m_ProductLevel = ProductLevel
+4 -4
View File
@@ -17,9 +17,9 @@ Imports System.Windows
<Assembly: AssemblyTitle("LicenceManager")>
<Assembly: AssemblyDescription("LicenceManager")>
#End If
<Assembly: AssemblyCompany("Egalware srl")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("LicenceManager")>
<Assembly: AssemblyCopyright("Copyright © 2018-20123")>
<Assembly: AssemblyCopyright("Copyright © 2018-2026")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -59,5 +59,5 @@ Imports System.Windows
' usando l'asterisco '*' come illustrato di seguito:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.5.10.1")>
<Assembly: AssemblyFileVersion("2.5.10.1")>
<Assembly: AssemblyVersion("3.1.1.1")>
<Assembly: AssemblyFileVersion("3.1.1.1")>
+13 -13
View File
@@ -1,10 +1,10 @@
'------------------------------------------------------------------------------
' <auto-generated>
' Il codice è stato generato da uno strumento.
' Versione runtime:4.0.30319.42000
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
' il codice viene rigenerato.
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
@@ -15,14 +15,14 @@ Imports System
Namespace My.Resources
'Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder.
'tramite uno strumento quale ResGen o Visual Studio.
'Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen
'con l'opzione /str oppure ricompilare il progetto VS.
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
@@ -33,7 +33,7 @@ Namespace My.Resources
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe.
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
@@ -47,8 +47,8 @@ Namespace My.Resources
End Property
'''<summary>
''' Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le
''' ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata.
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
+25 -23
View File
@@ -1,10 +1,10 @@
'------------------------------------------------------------------------------
' <auto-generated>
' Il codice è stato generato da uno strumento.
' Versione runtime:4.0.30319.42000
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
' il codice viene rigenerato.
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
@@ -12,16 +12,17 @@ Option Strict On
Option Explicit On
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Namespace My
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "Funzionalità di salvataggio automatico My.Settings"
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.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 "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
@@ -35,10 +36,10 @@ Partial Friend NotInheritable Class MySettings
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
@@ -49,10 +50,11 @@ Partial Friend NotInheritable Class MySettings
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
@@ -62,9 +64,9 @@ Namespace My
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.LicenseManager.MySettings
Friend ReadOnly Property Settings() As Global.LicenseManager.My.MySettings
Get
Return Global.LicenseManager.MySettings.Default
Return Global.LicenseManager.My.MySettings.Default
End Get
End Property
End Module
+14 -13
View File
@@ -239,45 +239,46 @@
Grid.ColumnSpan="4"
RowHeight="20"
Height="Auto"
MaxHeight="250"
MaxHeight="400"
ColumnHeaderHeight="25"
Margin="5,0,5,0"
MouseDoubleClick="Row_MouseDoubleClick" >
<DataGrid.Columns>
<DataGridTextColumn Header="ProductName"
Binding="{Binding ProductName, Mode=OneWay}"
Width="0.7*"/>
<DataGridTextColumn Header="ProductVersion"
Width="0.4*"/>
<DataGridTextColumn Header="Version"
Binding="{Binding ProductVersion, Mode=OneWay}"
Width="SizeToHeader"/>
<DataGridTextColumn Header="ProductLevel"
<DataGridTextColumn Header="Level"
Binding="{Binding ProductLevel, Mode=OneWay}"
Width="SizeToHeader"/>
<DataGridTextColumn Header="Option 1"
<DataGridTextColumn Header="Option 1 "
Binding="{Binding Option1, Mode=OneWay}"
Width="SizeToHeader"/>
<DataGridTextColumn Header="Option 2"
<DataGridTextColumn Header="Option 2 "
Binding="{Binding Option2, Mode=OneWay}"
Width="SizeToHeader"/>
<DataGridTextColumn Header="LockID"
Binding="{Binding Number, Mode=OneWay}"
Width="1*"/>
Width="0.8*"/>
<DataGridTextColumn Header="File"
Binding="{Binding File, Mode=OneWay}"
Width="2*"/>
<DataGridTextColumn Header="License Date"
Width="1.6*"/>
<DataGridTextColumn Header="License Date "
Binding="{Binding LicenseDate, Mode=OneWay, StringFormat=\{0:dd/MM/yyyy\}}"
Width="SizeToHeader"/>
<!--<DataGridTextColumn Header="License File Content"
Binding="{Binding LicFile, Mode=OneWay}"
Width="1*"/>-->
<DataGridTextColumn Header="Expiration Date"
Binding="{Binding OptionDeadline, Mode=OneWay, StringFormat=\{0:dd/MM/yyyy\}}"
Width="SizeToHeader"/>
<DataGridTextColumn Header="End Service Date"
Binding="{Binding ExpirationDate, Mode=OneWay, StringFormat=\{0:dd/MM/yyyy\}}"
Width="SizeToHeader"/>
<DataGridTextColumn Header="Note"
Binding="{Binding Note, Mode=OneWay}"
Width="2*"/>
Width="2.6*"/>
</DataGrid.Columns>
</DataGrid>
+1 -1
View File
@@ -188,7 +188,7 @@
<EgtWPFLib5:EgtTextBox Name="textBoxNote" Text="{Binding Note, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
Grid.Column="3"
Grid.Row="3"
Style="{StaticResource ParameterTextBox}" TextWrapping="Wrap" HorizontalContentAlignment="Left" Width="Auto" />
Style="{StaticResource ParameterTextBox}" TextWrapping="Wrap" HorizontalContentAlignment="Left" Width="Auto" Margin="10,5,10,5" />
<TextBlock Text="{Binding KeyNumberMsg}"
Grid.Column="0"
+5 -1
View File
@@ -513,7 +513,11 @@ Public Class UpdateLicencePageVM
NotifyPropertyChanged("ProductDeadline")
m_OptionDeadline = Licence.OptionDeadline
NotifyPropertyChanged("OptionDeadline")
m_LicenseDate = Licence.LicenseDate
If Overwrite Then
m_LicenseDate = Licence.LicenseDate
Else
m_LicenseDate = DateTime.Now
End If
NotifyPropertyChanged("LicenseDate")
' Resetto i campi NestKey e NestDeadline e carico i valori grazie al LicenceID associato
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle.Cryptography" version="2.5.1" targetFramework="net472" />
<package id="Google.Protobuf" version="3.30.0" targetFramework="net472" />
<package id="K4os.Compression.LZ4" version="1.3.8" targetFramework="net472" />
<package id="K4os.Compression.LZ4.Streams" version="1.3.8" targetFramework="net472" />
<package id="K4os.Hash.xxHash" version="1.0.8" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net472" />
<package id="MySql.Data" version="9.4.0" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Configuration.ConfigurationManager" version="8.0.0" targetFramework="net472" />
<package id="System.Diagnostics.DiagnosticSource" version="8.0.1" targetFramework="net472" />
<package id="System.IO.Pipelines" version="5.0.2" targetFramework="net472" />
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
<package id="ZstdSharp.Port" version="0.8.5" targetFramework="net472" />
</packages>