8 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
Dario Sassi f4f19bb8f0 LicenceManager 2.5j1 :
- aggiornamenti vari.
2023-10-09 13:11:06 +02:00
RenzoL 538cbbd89d Merge branch 'RenzoL' 2022-03-23 11:21:28 +01:00
RenzoL 837f13b08e Merge branch 'RenzoL' 2022-03-18 11:38:11 +01:00
RenzoL 9717503516 Merge branch 'RenzoL' 2022-02-24 16:19:47 +01:00
RenzoL fbcc2c97de Merge branch 'RenzoL' 2022-01-14 15:59:14 +01:00
17 changed files with 205 additions and 100 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>
+1 -1
View File
@@ -164,7 +164,7 @@ Public Class LicenceBoxVM
Dim Query As String = "SELECT " & DB_NESTDEADLINE & " FROM " & DB_LICENCE & " WHERE " & DB_LICENCEID & " = " & licId
Dim m_NestKeyDict As Dictionary(Of String, String) = ManageDb.ExecuteStringDictionaryQuery(Query)
Dim NestDl As String = m_NestKeyDict(DB_NESTDEADLINE)
If Not String.IsNullOrWhiteSpace(NestDl) Or Not String.IsNullOrEmpty(NestDl) Then
If Not String.IsNullOrWhiteSpace(NestDl) Then
m_NestDlTxBl_Visibility = Visibility.Visible
m_NestDlTxBx_Visibility = Visibility.Visible
m_NestDeadline = NestDl
+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("Egaltech srl")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("LicenceManager")>
<Assembly: AssemblyCopyright("Copyright © 2018-2019")>
<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.4.3.2")>
<Assembly: AssemblyFileVersion("2.4.3.2")>
<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
+4 -4
View File
@@ -573,7 +573,7 @@ Public Class NewLicencePageVM
StringFile.Add("Opt2=" & nDecOption2)
StringFile.Add("OptExpDays=" & DayOptionDeadline)
' Se il campo NestKey non è vuoto aggiungo anche quello al file
If Not String.IsNullOrEmpty(NestKey) Or Not String.IsNullOrWhiteSpace(NestKey) Then
If Not String.IsNullOrWhiteSpace(NestKey) Then
StringFile.Add("NestKey=" & NestKey)
End If
@@ -614,8 +614,8 @@ Public Class NewLicencePageVM
' L'aggiunta della string NestKey al file .lic è necessaria perchè viene sì scritta nel .Kge ma viene ignorata dal KeyGenerator
Try
Dim sLicFile As String = Path.ChangeExtension(fileName.Replace("\", "\\"), ".lic")
If (File.Exists(sLicFile)) And (Not String.IsNullOrEmpty(NestKey) Or Not String.IsNullOrWhiteSpace(NestKey)) Then
My.Computer.FileSystem.WriteAllText(sLicFile, "NestKey=" & NestKey, True, Text.Encoding.UTF8)
If (File.Exists(sLicFile)) And Not String.IsNullOrWhiteSpace(NestKey) Then
My.Computer.FileSystem.WriteAllText(sLicFile, "NestKey=" & NestKey & vbNewLine, True, Text.Encoding.UTF8)
End If
Catch ex As Exception
@@ -634,7 +634,7 @@ Public Class NewLicencePageVM
Try
If String.IsNullOrEmpty(NestKey) Or String.IsNullOrWhiteSpace(NestKey) Then
If String.IsNullOrWhiteSpace(NestKey) Then
Query = "INSERT INTO " & DB_LICENCE & " (" & DB_PRODUCTID & ", " & DB_PRODUCTVERSION & ", " & DB_PRODUCTLEVEL & ", " &
DB_PRODUCTDEADLINE & ", " & DB_OPTION1 & ", " & DB_OPTION2 & ", " &
DB_OPTIONDEADLINE & ", " & DB_LOCKID & ", " & DB_FILE & ", " &
+2 -2
View File
@@ -81,7 +81,7 @@ Public Class SearchKeyPageVM
End Property
Private m_Note As String
Public Property Note As String
Public Overloads Property Note As String
Get
Return m_Note
End Get
@@ -92,7 +92,7 @@ Public Class SearchKeyPageVM
End Property
Private m_Seriale As String
Public Property Seriale As String
Public Overloads Property Seriale As String
Get
Return m_Seriale
End Get
+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
@@ -276,7 +276,7 @@ Public Class SearchReseller
End Property
Private m_Note As String
Public ReadOnly Property Note As String
Public Overloads ReadOnly Property Note As String
Get
Return m_Note
End Get
+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"
+24 -20
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
@@ -524,7 +528,7 @@ Public Class UpdateLicencePageVM
m_NestKey = m_NestKeyDict(DB_NESTKEY)
Dim sNestDl As String = m_NestKeyDict(DB_NESTDEADLINE)
Dim splittedNestDl() As String = Split(sNestDl)
If Not String.IsNullOrEmpty(splittedNestDl(0)) Then
If Not String.IsNullOrWhiteSpace(splittedNestDl(0)) Then
m_NestDeadline = Date.ParseExact(splittedNestDl(0), "dd/MM/yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
End If
NotifyPropertyChanged("NestKey")
@@ -660,7 +664,7 @@ Public Class UpdateLicencePageVM
StringFile.Add("Opt2=" & nDecOption2)
StringFile.Add("OptExpDays=" & DayOptionDeadline)
' Se il campo NestKey non è vuoto aggiungo anche quello al file
If Not String.IsNullOrEmpty(NestKey) Or Not String.IsNullOrWhiteSpace(NestKey) Then
If Not String.IsNullOrWhiteSpace(NestKey) Then
StringFile.Add("NestKey=" & NestKey)
End If
@@ -701,8 +705,8 @@ Public Class UpdateLicencePageVM
' L'aggiunta della string NestKey al file .lic è necessaria perchè viene sì scritta nel .Kge ma viene ignorata dal KeyGenerator
Try
Dim sLicFile As String = Path.ChangeExtension(FilePath.Replace("\", "\\"), ".lic")
If (File.Exists(sLicFile)) And (Not String.IsNullOrEmpty(NestKey) Or Not String.IsNullOrWhiteSpace(NestKey)) Then
My.Computer.FileSystem.WriteAllText(sLicFile, "NestKey=" & NestKey, True, Text.Encoding.UTF8)
If (File.Exists(sLicFile)) And Not String.IsNullOrWhiteSpace(NestKey) Then
My.Computer.FileSystem.WriteAllText(sLicFile, "NestKey=" & NestKey & vbNewLine, True, Text.Encoding.UTF8)
End If
Catch ex As Exception
@@ -719,15 +723,15 @@ Public Class UpdateLicencePageVM
' Cerco nella tabella Licence
Query = "UPDATE " & DB_LICENCE
Dim bFirstWhere As Boolean = True
If Not IsNothing(m_SelVersion) OrElse
Not String.IsNullOrWhiteSpace(m_SelProductLevel) OrElse
Not IsNothing(ProductDeadline) OrElse
Not nDecOption1 = 0 OrElse
Not nDecOption2 = 0 OrElse
Not IsNothing(OptionDeadline) OrElse
Not IsNothing(LicenseDate) OrElse
Not String.IsNullOrWhiteSpace(FileName) OrElse
Not String.IsNullOrWhiteSpace(LockID) Then
If (Not IsNothing(m_SelVersion) OrElse
Not String.IsNullOrWhiteSpace(m_SelProductLevel.ToString()) OrElse
Not IsNothing(ProductDeadline) OrElse
Not nDecOption1 = 0 OrElse
Not nDecOption2 = 0 OrElse
Not IsNothing(OptionDeadline) OrElse
Not IsNothing(LicenseDate) OrElse
Not String.IsNullOrWhiteSpace(FileName) OrElse
Not String.IsNullOrWhiteSpace(LockID)) Then
Query &= " SET "
If Not IsNothing(m_SelVersion) Then
EvalWhere(bFirstWhere, Query)
@@ -735,7 +739,7 @@ Public Class UpdateLicencePageVM
End If
If Not IsNothing(m_SelProductLevel) Then
EvalWhere(bFirstWhere, Query)
Query &= DB_PRODUCTLEVEL & " = '" & m_SelProductLevel & "' "
Query &= DB_PRODUCTLEVEL & " = '" & m_SelProductLevel.ToString() & "' "
End If
If Not IsNothing(ProductDeadline) Then
EvalWhere(bFirstWhere, Query)
@@ -776,7 +780,7 @@ Public Class UpdateLicencePageVM
' Alla fine in ogni caso aggiorniamo anche NestKey e NestDeadline
EvalWhere(bFirstWhere, Query)
If String.IsNullOrEmpty(NestKey) Or String.IsNullOrWhiteSpace(NestKey) Then
If String.IsNullOrWhiteSpace(NestKey) Then
Query &= DB_NESTKEY & " = NULL, " & DB_NESTDEADLINE & " = NULL "
Else
Query &= DB_NESTKEY & " = '" & m_NestKey & "', " & DB_NESTDEADLINE & " = '" & Format(NestDeadline, "yyyy-MM-dd") & "' "
@@ -848,7 +852,7 @@ Public Class UpdateLicencePageVM
StringFile.Add("Opt2=" & nDecOption2)
StringFile.Add("OptExpDays=" & DayOptionDeadline)
' Se il campo NestKey non è vuoto aggiungo anche quello al file
If Not String.IsNullOrEmpty(NestKey) Or Not String.IsNullOrWhiteSpace(NestKey) Then
If Not String.IsNullOrWhiteSpace(NestKey) Then
StringFile.Add("NestKey=" & NestKey)
End If
@@ -889,8 +893,8 @@ Public Class UpdateLicencePageVM
' L'aggiunta della string NestKey al file .lic è necessaria perchè viene sì scritta nel .Kge ma viene ignorata dal KeyGenerator
Try
Dim sLicFile As String = Path.ChangeExtension(FilePath.Replace("\", "\\"), ".lic")
If (File.Exists(sLicFile)) And (Not String.IsNullOrEmpty(NestKey) Or Not String.IsNullOrWhiteSpace(NestKey)) Then
My.Computer.FileSystem.WriteAllText(sLicFile, "NestKey=" & NestKey, True, Text.Encoding.UTF8)
If (File.Exists(sLicFile)) And Not String.IsNullOrWhiteSpace(NestKey) Then
My.Computer.FileSystem.WriteAllText(sLicFile, "NestKey=" & NestKey & vbNewLine, True, Text.Encoding.UTF8)
End If
Catch ex As Exception
@@ -902,7 +906,7 @@ Public Class UpdateLicencePageVM
Try
Dim textLic As String = File.ReadAllText(Path.ChangeExtension(FilePath.Replace("\", "\\"), ".lic"))
If String.IsNullOrEmpty(NestKey) Or String.IsNullOrWhiteSpace(NestKey) Then
If String.IsNullOrWhiteSpace(NestKey) Then
Query = "INSERT INTO " & DB_LICENCE & " (" & DB_PRODUCTID & ", " & DB_PRODUCTVERSION & ", " & DB_PRODUCTLEVEL & ", " &
DB_PRODUCTDEADLINE & ", " & DB_OPTION1 & ", " & DB_OPTION2 & ", " &
DB_OPTIONDEADLINE & ", " & DB_LOCKID & ", " & DB_FILE & ", " &
+4 -4
View File
@@ -4,11 +4,11 @@ Module ManageFile
Public Function ComputeFileName(FilePath As String, FileNameOnly As String) As String
' Resetto il nome del file (in modo che sia senza '_' e numero) e cerco nel DB se è già presente un file con lo stesso nome
FilePath = Path.GetDirectoryName(FilePath) & "\" & FileNameOnly.Split("_")(0) & ".Kge"
FilePath = Path.GetDirectoryName(FilePath) & "\" & FileNameOnly.Split("_"c)(0) & ".Kge"
FilePath = FilePath.Replace("\", "\\")
Dim sFileNameQuery = "SELECT * FROM " & DB_LICENCE & " WHERE " & DB_FILE & " = '" & FilePath & "' "
Dim m_UpdateLicDict As Dictionary(Of String, String) = ManageDb.ExecuteStringDictionaryQuery(sFileNameQuery)
If m_UpdateLicDict.ContainsKey(DB_FILE) AndAlso Not String.IsNullOrEmpty(m_UpdateLicDict(DB_FILE)) Then
If m_UpdateLicDict.ContainsKey(DB_FILE) AndAlso Not String.IsNullOrWhiteSpace(m_UpdateLicDict(DB_FILE)) Then
' Se il nome del file già esiste procedo col loop per il calcolo del numero dopo '_'
FilePath = FilePath.Replace("\\", "\")
Dim fileNumber As Integer = 0
@@ -16,7 +16,7 @@ Module ManageFile
FilePath = FilePath.Replace("\", "\\")
sFileNameQuery = "SELECT * FROM " & DB_LICENCE & " WHERE " & DB_FILE & " = '" & FilePath & "' "
m_UpdateLicDict = ManageDb.ExecuteStringDictionaryQuery(sFileNameQuery)
If m_UpdateLicDict.ContainsKey(DB_FILE) AndAlso Not String.IsNullOrEmpty(m_UpdateLicDict(DB_FILE)) Then
If m_UpdateLicDict.ContainsKey(DB_FILE) AndAlso Not String.IsNullOrWhiteSpace(m_UpdateLicDict(DB_FILE)) Then
'The file does exist, so increment and try the next one
fileNumber = fileNumber + 1
FilePath = FilePath.Replace("\\", "\")
@@ -28,7 +28,7 @@ Module ManageFile
Else
'The file does not exist, do something..
If fileNumber = 1 Then
FilePath = FilePath.Split("_")(0) & "_1.Kge"
FilePath = FilePath.Split("_"c)(0) & "_1.Kge"
End If
Exit Do
End If
+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>