Compare commits
1 Commits
main
...
ProcPipeComm
| Author | SHA1 | Date | |
|---|---|---|---|
| 37986b0bcb |
Binary file not shown.
@@ -19,6 +19,7 @@ Public Module ConstIni
|
||||
' File con dati di licenza
|
||||
Public Const LIC_FILE_NAME As String = "WebDoorCreator.CamSrv.lic"
|
||||
Public Const S_LICENCE As String = "Licence"
|
||||
Public Const K_LOCKID As String = "LockId"
|
||||
Public Const K_KEY As String = "Key"
|
||||
|
||||
' File di log generale
|
||||
|
||||
@@ -937,7 +937,10 @@ Public Class ProcMan
|
||||
' elimino vecchi
|
||||
If Not IsNothing(fileList) Then
|
||||
For Each sFile In fileList
|
||||
File.Delete(sFile)
|
||||
Try
|
||||
File.Delete(sFile)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -1297,22 +1300,27 @@ Public Class ProcMan
|
||||
Private Sub ProcMan_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
m_IniFilePath = AppDomain.CurrentDomain.BaseDirectory & INI_FILE_NAME
|
||||
ManageInstance()
|
||||
' Imposto tipo di chiave
|
||||
EgtSetLockType(KEY_TYPE.HW)
|
||||
' Leggo e imposto chiave di protezione
|
||||
Dim sLicFileName As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName, m_IniFilePath)
|
||||
Dim sLicFile As String = AppDomain.CurrentDomain.BaseDirectory & sLicFileName
|
||||
Dim sKey As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_IniFilePath) = 1)
|
||||
EgtSetNetHwKey(bNetHwKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim nKeyLevel As Integer = 0
|
||||
Dim nKeyOptions As Integer = 0
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9935, 2505, 1, nKeyLevel) And
|
||||
EgtGetKeyOptions(9935, 2505, 1, nKeyOptions)
|
||||
'' Imposto tipo di chiave
|
||||
'EgtSetLockType(KEY_TYPE.HW)
|
||||
'' Leggo e imposto chiave di protezione
|
||||
'Dim sLicFileName As String = String.Empty
|
||||
'GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName, m_IniFilePath)
|
||||
'Dim sLicFile As String = AppDomain.CurrentDomain.BaseDirectory & sLicFileName
|
||||
'Dim sKey As String = String.Empty
|
||||
'EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
'EgtSetKey(sKey)
|
||||
'Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_IniFilePath) = 1)
|
||||
'EgtSetNetHwKey(bNetHwKey)
|
||||
'Dim sLockId As String = ""
|
||||
'EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||
'If Not String.IsNullOrEmpty(sLockId) Then
|
||||
' Dim x = EgtSetLockId(sLockId)
|
||||
'End If
|
||||
'' Recupero livello e opzioni della chiave
|
||||
'Dim nKeyLevel As Integer = 0
|
||||
'Dim nKeyOptions As Integer = 0
|
||||
'Dim bKey As Boolean = EgtGetKeyLevel(9935, 2505, 1, nKeyLevel) And
|
||||
' EgtGetKeyOptions(9935, 2505, 1, nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_sLogFile = AppDomain.CurrentDomain.BaseDirectory & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf &
|
||||
@@ -1322,10 +1330,10 @@ Public Class ProcMan
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
EgtInit(0, m_sLogFile, sLogMsg)
|
||||
If Not bKey Then
|
||||
MessageBox.Show("No licences available!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||||
End
|
||||
End If
|
||||
'If Not bKey Then
|
||||
' MessageBox.Show("No licences available!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||||
' End
|
||||
'End If
|
||||
|
||||
' leggo sorgente richieste rest da ini
|
||||
GetPrivateProfileString(S_GENERAL, K_BASEIP, "", baseIp, m_IniFilePath)
|
||||
|
||||
Reference in New Issue
Block a user