EgtCAM5 :
- aggiunta visualizzazione Estensioni caricate (Beam, Wall, Doors, Gunstock) con versione e direttorio di installazione.
This commit is contained in:
@@ -28,7 +28,6 @@ Public Class AboutBoxWndV
|
||||
Else
|
||||
sInfo &= "Only Draw Mode" & Environment.NewLine
|
||||
End If
|
||||
If IniFile.IsActiveDoors() Then sInfo &= "Doors " & IniFile.m_sDoorsDirPath & Environment.NewLine
|
||||
Dim sOpSys As String = String.Empty
|
||||
EgtGetOsInfo( sOpSys)
|
||||
sInfo &= sOpSys & Environment.NewLine
|
||||
@@ -41,6 +40,34 @@ Public Class AboutBoxWndV
|
||||
Dim sScene As String = String.Empty
|
||||
EgtGetSceneInfo(sScene)
|
||||
sInfo &= sScene
|
||||
' Extensions
|
||||
sInfo &= Environment.NewLine & "Extensions :"
|
||||
Dim bExtensions As Boolean = False
|
||||
If IniFile.IsActiveBeam() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
|
||||
End If
|
||||
If IniFile.IsActiveWall() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath
|
||||
End If
|
||||
If IniFile.IsActiveDoors() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||
End If
|
||||
If IniFile.IsActiveGunStock() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sGunstockDirPath, sVersion)
|
||||
sInfo &= Environment.NewLine & "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath
|
||||
End If
|
||||
If Not bExtensions Then sInfo &= Environment.NewLine & "---"
|
||||
InfoLbl.Text = sInfo
|
||||
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
|
||||
End Sub
|
||||
|
||||
@@ -133,6 +133,38 @@ Public Class ProjectVM
|
||||
Dim nFlag As Integer = GetPrivateProfileInt( S_IMPORT, K_BTLFLAG, EIB_FL.NONE)
|
||||
EgtInitBeamMgr( nFlag)
|
||||
End If
|
||||
' Log di eventuali estensioni
|
||||
EgtOutLog( "Extensions :")
|
||||
Dim bExtensions As Boolean = False
|
||||
If IniFile.IsActiveBeam() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sBeamDirPath, sVersion)
|
||||
Dim sOut As String = "Beam ver. " & sVersion & " " & IniFile.m_sBeamDirPath
|
||||
EgtOutLog( sOut)
|
||||
End If
|
||||
If IniFile.IsActiveWall() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sWallDirPath, sVersion)
|
||||
Dim sOut As String = "Wall ver. " & sVersion & " " & IniFile.m_sWallDirPath
|
||||
EgtOutLog( sOut)
|
||||
End If
|
||||
If IniFile.IsActiveDoors() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sDoorsDirPath, sVersion)
|
||||
Dim sOut As String = "Doors ver. " & sVersion & " " & IniFile.m_sDoorsDirPath
|
||||
EgtOutLog( sOut)
|
||||
End If
|
||||
If IniFile.IsActiveGunStock() Then
|
||||
bExtensions = True
|
||||
Dim sVersion As String = "---"
|
||||
IniFile.GetSpecialLuaVersion( IniFile.m_sGunstockDirPath, sVersion)
|
||||
Dim sOut As String = "Gunstock ver. " & sVersion & " " & IniFile.m_sGunstockDirPath
|
||||
EgtOutLog( sOut)
|
||||
End If
|
||||
If Not bExtensions Then EgtOutLog( "---")
|
||||
' Apro progetto vuoto
|
||||
Map.refTopCommandBarVM.NewCmd()
|
||||
' Seleziono la macchina impostata nel file ini
|
||||
|
||||
@@ -21,10 +21,9 @@ Module Beam
|
||||
Friend Function ExecBeam(sFile As String, sMachine As String, nFlag As Integer, bBtl As Boolean) As Boolean
|
||||
EgtOutLog("-- Start ExecBeam --")
|
||||
' Recupero lo script da eseguire
|
||||
Dim sExecPath As String = ""
|
||||
Dim sExecName As String = ""
|
||||
GetPrivateProfileString(S_BEAM, If(bBtl, K_BEAMBTLEXEC, K_BEAMBWEEXEC), "", sExecName)
|
||||
sExecPath = (IniFile.m_sBeamDirPath & "\" & sExecName).TrimEnd({"\"c})
|
||||
Dim sExecPath As String = (IniFile.m_sBeamDirPath & "\" & sExecName).TrimEnd({"\"c})
|
||||
If Not My.Computer.FileSystem.FileExists(sExecPath) Then
|
||||
EgtOutLog("Not found BeamExec script " & sExecPath)
|
||||
Return False
|
||||
|
||||
+19
-2
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Module IniFile
|
||||
@@ -64,10 +65,12 @@ Public Module IniFile
|
||||
Friend m_sBeamDirPath As String
|
||||
' path della cartella WALL
|
||||
Friend m_sWallDirPath As String
|
||||
' path della cartella BEALWALL
|
||||
' path della cartella BEAMWALL
|
||||
Friend m_sBeamWallDirPath As String
|
||||
' path della cartella DOORS
|
||||
Friend m_sDoorsDirPath As String
|
||||
' path della cartella GUNSTOCK
|
||||
Friend m_sGunstockDirPath As String
|
||||
' path della cartella Printing3d
|
||||
Friend m_sPrinting3dDirPath As String
|
||||
|
||||
@@ -289,7 +292,13 @@ Public Module IniFile
|
||||
End Function
|
||||
|
||||
Friend Function IsActiveGunStock() As Boolean
|
||||
Return (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||
Dim bIsActive As Boolean = (IniFile.m_nKeyOptions And KEY_OPT.GUNSTOCK) <> 0 And (GetPrivateProfileInt(S_GUNSTOCK, K_GUNSTOCKENABLE, 0) <> 0)
|
||||
If bIsActive Then
|
||||
Dim sTemp As String = ""
|
||||
GetPrivateProfileString(S_GUNSTOCK, K_GUNSTOCKEXEC, "", sTemp)
|
||||
m_sGunstockDirPath = Path.GetDirectoryName( sTemp)
|
||||
End If
|
||||
Return bIsActive
|
||||
End Function
|
||||
|
||||
Friend Function IsKeyEnabledVirtualMilling() As Boolean
|
||||
@@ -301,4 +310,12 @@ Public Module IniFile
|
||||
Return GetPrivateProfileInt(S_SPECIAL, K_SPECIALENABLE, 0) <> 0 AndAlso GetPrivateProfileButton(S_SPECIAL, K_BUTTON & "1", "", btDummy)
|
||||
End Function
|
||||
|
||||
Friend Function GetSpecialLuaVersion( sSpecialLuaDir As String, ByRef sVersion As String) As Boolean
|
||||
Dim sExecPath As String = (sSpecialLuaDir & "\Version.lua")
|
||||
If Not EgtLuaExecFile(sExecPath, False) Then Return False
|
||||
If Not EgtLuaGetGlobStringVar("VERSION", sVersion) Then Return False
|
||||
EgtLuaResetGlobVar("VERSION")
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Module
|
||||
|
||||
Reference in New Issue
Block a user