Files
EgtCAM5/IniFile.vb
T
Dario Sassi 6172fdc1f7 EgtCAM5 1.6u1 :
- modifiche per nuovo gruppo di lavoro con macchina corrente
- modifiche per utensili speciali.
2016-09-14 09:33:30 +00:00

76 lines
3.7 KiB
VB.net

Imports EgtUILib
Module IniFile
' MainWindow Page
Friend m_nInstance As Integer = 0
Friend m_nUserLevel As Integer = 1
Friend m_nKeyLevel As Integer = 0
Friend m_nKeyOptions As UInteger = 0
Friend Enum KEY_OPT As UInteger
BASE = 1
End Enum
Friend m_sIniFile As String
Friend m_sTempDir As String
Friend m_sMachinesRoot As String
' Project Page
Friend m_ProjectSceneContext As Integer = 0
Friend m_bScriptRunning As Boolean = False
Friend m_bStopScript As Boolean = False
' Current Machine
Friend m_sMachineName As String
Friend m_sCurrMachIniFilePath As String
Friend m_sCurrMachToolsDirPath As String
' Variabile che contiene la path della cartella che contiene i ToolMaker
Friend m_sToolMakersDir As String = String.Empty
' Variabile che contiene il contesto della scena presente nel database utensili
Friend m_ToolsDbSceneContext As Integer = 0
Public Function GetPrivateProfileInt(IpAppName As String, IpKeyName As String, nDefault As Integer) As Integer
Return EgtUILib.GetPrivateProfileInt(IpAppName, IpKeyName, nDefault, m_sIniFile)
End Function
Public Function GetPrivateProfileDouble(IpAppName As String, IpKeyName As String, nDefault As Integer) As Double
Return EgtUILib.GetPrivateProfileDouble(IpAppName, IpKeyName, nDefault, m_sIniFile)
End Function
Public Function GetPrivateProfileString(IpAppName As String, IpKeyName As String, IpDefault As String, ByRef IpString As String) As Integer
Return EgtUILib.GetPrivateProfileString(IpAppName, IpKeyName, IpDefault, IpString, m_sIniFile)
End Function
Public Function GetPrivateProfileColor(IpAppName As String, IpKeyName As String, ByRef Col As EgtUILib.EgtInterface.Color3d) As Boolean
Return EgtUILib.GetPrivateProfileColor(IpAppName, IpKeyName, Col, m_sIniFile)
End Function
Public Function GetPrivateProfileWinPos(IpAppName As String, IpKeyName As String, ByRef nFlag As Integer, ByRef nLeft As Integer, ByRef nTop As Integer, ByRef nWidth As Integer, ByRef nHeight As Integer) As Boolean
Return EgtUILib.GetPrivateProfileWinPos(IpAppName, IpKeyName, nFlag, nLeft, nTop, nWidth, nHeight, m_sIniFile)
End Function
Public Function GetPrivateProfileZoomWin(IpAppName As String, IpKeyName As String, ByRef bOutline As Boolean, ByRef Col As EgtUILib.EgtInterface.Color3d) As Boolean
Return EgtUILib.GetPrivateProfileZoomWin(IpAppName, IpKeyName, bOutline, Col, m_sIniFile)
End Function
Public Function GetPrivateProfileFloatingWinPos(lpAppName As String, lpKeyName As String, ByRef nState As String, ByRef nIndex As Integer, ByRef nLeft As Integer, ByRef nTop As Integer) As Boolean
Dim sVal As String = String.Empty
GetPrivateProfileString(lpAppName, lpKeyName, "", sVal)
Dim sItems() As String = sVal.Split(",".ToCharArray)
If sItems.Count() >= 4 Then
nState = sItems(0)
nIndex = CInt(sItems(1))
nLeft = CInt(sItems(2))
nTop = CInt(sItems(3))
Return True
End If
Return False
End Function
Public Function WritePrivateProfileString(IpAppName As String, IpKeyName As String, ByRef IpString As String) As Boolean
Return EgtUILib.WritePrivateProfileString(IpAppName, IpKeyName, IpString, m_sIniFile)
End Function
Public Function WritePrivateProfileWinPos(IpAppName As String, IpKeyName As String, ByRef nFlag As Integer, ByRef nLeft As Integer, ByRef nTop As Integer, ByRef nWidth As Integer, ByRef nHeight As Integer) As Boolean
Return EgtUILib.WritePrivateProfileWinPos(IpAppName, IpKeyName, nFlag, nLeft, nTop, nWidth, nHeight, m_sIniFile)
End Function
End Module