0532c0c486
- gestione ribs completata - nuove funzionalita' introdotte su tabella TFS - correzioni e migliorie varie
27 lines
1.3 KiB
VB.net
27 lines
1.3 KiB
VB.net
Imports EgtWPFLib5
|
|
|
|
Module Printing3DUtility
|
|
|
|
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
|
|
GetmainPrivateProfileString(sSection, sKey, "", sVal)
|
|
If String.IsNullOrWhiteSpace(sVal) Then Return False
|
|
Dim sItems() As String = sVal.Split(",".ToCharArray)
|
|
If sItems.Count() >= 1 Then
|
|
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), "")
|
|
Dim sDrawMachOrBoth As String = If(sItems.Count() >= 4 AndAlso Not String.IsNullOrWhiteSpace(sItems(3)), sItems(3), "1")
|
|
If Not String.IsNullOrWhiteSpace(sBaseDir) And Not String.IsNullOrWhiteSpace(sLuaPath) Then
|
|
If sLuaPath.Contains(".lua") Then sLuaPath = sBaseDir & "\" & sLuaPath
|
|
If Not String.IsNullOrWhiteSpace(sImagePath) Then sImagePath = sBaseDir & "\" & sImagePath
|
|
End If
|
|
ReadedButtonItem = New ButtonItem(sLuaPath, sImagePath, sToolTip, sDrawMachOrBoth)
|
|
Return True
|
|
End If
|
|
Return False
|
|
End Function
|
|
|
|
End Module
|