Effector.Main 3.1.5.3:
- spostata sezione lettura lingua e messaggi prima di inizializzazione programma per avere messaggi di problemi chiavi o licenza tradotti
This commit is contained in:
@@ -167,33 +167,6 @@ Public Class MainWindowM
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
EgtOutLog(sLogMsg)
|
||||
' Gestione della chiave di protezione
|
||||
Dim sLicFileName As String = ""
|
||||
GetMainPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
|
||||
Dim sLicFile As String = sConfigDir & "\" & sLicFileName
|
||||
Dim sKey As String = ""
|
||||
GenInterface.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(7375, 2706, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(7375, 2706, 1, m_nKeyOpt1, m_nKeyOpt2)
|
||||
|
||||
If Not bKey Then
|
||||
EgtOutLog("Key or Licence Problem (" & (-nKeyLevel).ToString() & ")")
|
||||
MessageBox.Show(String.Format(EgtMsg(201), (-nKeyLevel).ToString()), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtOutLog("Exit")
|
||||
End
|
||||
End If
|
||||
'EgtInit(m_nDebug, m_sLogFile, sLogMsg)
|
||||
'EgtSetTempDir(m_sTempDir)
|
||||
'EgtSetIniFile(IniFile.m_sIniFile)
|
||||
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
|
||||
'Dim sMsgDir As String = String.Empty
|
||||
'If GetMainPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
|
||||
' sMsgDir = m_sConfigDir
|
||||
'End If
|
||||
'' Inizializzo OptionModule
|
||||
''OptionModule.InitOptionModule()
|
||||
' Leggo lingua corrente
|
||||
Dim sLanguage As String = String.Empty
|
||||
GetMainPrivateProfileString(S_GENERAL, K_MESSAGES, "", sLanguage)
|
||||
@@ -244,6 +217,33 @@ Public Class MainWindowM
|
||||
If Not EgtLoadMessages(sMsgFilePath) Then
|
||||
EgtOutLog("Error in EgtLoadMessages")
|
||||
End If
|
||||
' Gestione della chiave di protezione
|
||||
Dim sLicFileName As String = ""
|
||||
GetMainPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName)
|
||||
Dim sLicFile As String = sConfigDir & "\" & sLicFileName
|
||||
Dim sKey As String = ""
|
||||
GenInterface.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
EgtSetKey(sKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(7375, 2706, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(7375, 2706, 1, m_nKeyOpt1, m_nKeyOpt2)
|
||||
|
||||
If Not bKey Then
|
||||
EgtOutLog("Key or Licence Problem (" & (-nKeyLevel).ToString() & ")")
|
||||
MessageBox.Show(String.Format(EgtMsg(201), (-nKeyLevel).ToString()), "Error", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
EgtOutLog("Exit")
|
||||
End
|
||||
End If
|
||||
'EgtInit(m_nDebug, m_sLogFile, sLogMsg)
|
||||
'EgtSetTempDir(m_sTempDir)
|
||||
'EgtSetIniFile(IniFile.m_sIniFile)
|
||||
' Leggo direttorio dei messaggi (se manca uso direttorio di configurazione)
|
||||
'Dim sMsgDir As String = String.Empty
|
||||
'If GetMainPrivateProfileString(S_GENERAL, K_MESSAGESDIR, "", sMsgDir) = 0 Then
|
||||
' sMsgDir = m_sConfigDir
|
||||
'End If
|
||||
'' Inizializzo OptionModule
|
||||
''OptionModule.InitOptionModule()
|
||||
' Leggo e imposto livello utilizzatore
|
||||
' m_nUserLevel = Math.Min(m_nKeyLevel, GetMainPrivateProfileInt(S_GENERAL, K_USERLEVEL, 1))
|
||||
' Info su opzioni chiave
|
||||
|
||||
@@ -55,5 +55,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.1.5.2")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.2")>
|
||||
<Assembly: AssemblyVersion("3.1.5.3")>
|
||||
<Assembly: AssemblyFileVersion("3.1.5.3")>
|
||||
|
||||
Reference in New Issue
Block a user