EgtCAm5 :
- aggiunta gestione processing file btl da linea di comando.
This commit is contained in:
+20
-15
@@ -44,6 +44,8 @@ Public Module IniFile
|
||||
GUNSTOCK = 4
|
||||
DOORCREATOR = 8 ' Prodotto DOORCreator
|
||||
VIRTUALMILLING = 16
|
||||
JAMBS = 32
|
||||
BEAM = 64
|
||||
End Enum
|
||||
Friend m_sDataRoot As String
|
||||
Friend m_sConfigDir As String
|
||||
@@ -53,6 +55,8 @@ Public Module IniFile
|
||||
Friend m_sResourcesRoot As String
|
||||
Friend m_sTablesRoot As String
|
||||
Friend m_sLogFile As String
|
||||
' path della cartella BEAM
|
||||
Friend m_sBeamDirPath As String
|
||||
' path della cartella DOORS
|
||||
Friend m_sDoorsDirPath As String
|
||||
|
||||
@@ -189,24 +193,21 @@ Public Module IniFile
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Function GetPrivateProfileButton(
|
||||
ByVal lpAppName As String,
|
||||
ByVal lpKeyName As String, ByRef ReadedButtonItem As ButtonItem) As Boolean
|
||||
Public Function GetPrivateProfileButton(sSection As String, sKey As String, sBaseDir As String, ByRef ReadedButtonItem As ButtonItem) As Boolean
|
||||
ReadedButtonItem = Nothing
|
||||
Dim sVal As String = String.Empty
|
||||
GetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
|
||||
GetPrivateProfileString(sSection, sKey, "", sVal)
|
||||
If String.IsNullOrWhiteSpace(sVal) Then Return False
|
||||
Dim sItems() As String = sVal.Split(",".ToCharArray)
|
||||
If sItems.Count() >= 1 Then
|
||||
Dim sImagePath As String = String.Empty
|
||||
Dim sToolTip As String = String.Empty
|
||||
If sItems.Count() >= 2 Then
|
||||
sImagePath = sItems(1)
|
||||
If sItems.Count() >= 3 Then
|
||||
sToolTip = sItems(2)
|
||||
End If
|
||||
Dim sLuaPath As String = sItems(0)
|
||||
Dim sImagePath As String = If(sItems.Count() >= 2, sItems(1), "")
|
||||
Dim sToolTip As String = If(sItems.Count() >= 3, sItems(2), "")
|
||||
If Not String.IsNullOrWhiteSpace(sBaseDir) Then
|
||||
If Not String.IsNullOrWhiteSpace(sLuaPath) Then sLuaPath = IniFile.m_sBeamDirPath & "\" & sLuaPath
|
||||
If Not String.IsNullOrWhiteSpace(sImagePath) Then sImagePath = IniFile.m_sBeamDirPath & "\" & sImagePath
|
||||
End If
|
||||
ReadedButtonItem = New ButtonItem(sItems(0), sImagePath, sToolTip)
|
||||
ReadedButtonItem = New ButtonItem(sLuaPath, sImagePath, sToolTip)
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
@@ -225,11 +226,15 @@ Public Module IniFile
|
||||
Return EgtUILib.WritePrivateProfileString(IpAppName, IpKeyName, sColor, m_sIniFile)
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveBeam() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.BEAM) <> 0 And (GetPrivateProfileInt(S_BEAM, K_BTLENABLE, 0) <> 0)
|
||||
If bIsActive Then GetPrivateProfileString(S_BEAM, K_BEAMBASEDIR, "", m_sBeamDirPath)
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveDoors() As Boolean
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.DOORS) <> 0 And (GetPrivateProfileInt(S_DOORS, K_DDFENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
GetPrivateProfileString(S_DOORS, K_BASEDIR, "", m_sDoorsDirPath)
|
||||
End If
|
||||
If bIsActive Then GetPrivateProfileString(S_DOORS, K_BASEDIR, "", m_sDoorsDirPath)
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
|
||||
Reference in New Issue
Block a user