EgtDOORCreator 1.8d1 :
- modifiche e migliorie varie.
This commit is contained in:
@@ -24,21 +24,34 @@ Public Class CompoPanelViewModel
|
||||
Sub New(MainWindowViewModel As MainWindowViewModel)
|
||||
m_rfMainWindowViewModel = MainWindowViewModel
|
||||
m_rfDoorParametersViewModel = DirectCast(m_rfMainWindowViewModel.DoorParameters.DataContext, DoorParametersViewModel)
|
||||
Dim IndexCompoOrder = 0
|
||||
Dim CompoPanelList As List(Of String) = OptionModule.m_CompoPaneOrder
|
||||
' Lettura file ini per generare bottoni
|
||||
Dim Index As Integer = 1
|
||||
Dim CompoName As String = String.Empty
|
||||
Dim CompoNameDDF As String = String.Empty
|
||||
' Carico un vettore con il nome delle Path delle componenti
|
||||
Dim CompoArray() As String = Directory.GetDirectories("c:\EgtData\Doors\Compo")
|
||||
For Index = 0 To CompoArray.Count - 1
|
||||
' apro ogni directory e cerco un file di testo di nome Config.ini
|
||||
Dim CurrCompoPath As String = CompoArray(Index) & "\" & ConstCompo.CONFIGINI_FILE_NAME
|
||||
If File.Exists(CurrCompoPath) Then
|
||||
GetPrivateProfileCompoName(ConstCompo.S_COMPO, ConstCompo.K_NAME, CompoNameDDF, CompoName, CurrCompoPath)
|
||||
m_CompoTypeList.Add(New CompoType(CompoName, CompoNameDDF, CompoArray(Index)))
|
||||
End If
|
||||
Dim CompoDirectory As String = String.Empty
|
||||
If GetPrivateProfileString(S_DOORS, K_COMPODIR, "", CompoDirectory) <> 0 Then
|
||||
IniFile.m_CompoDir = CompoDirectory
|
||||
End If
|
||||
Dim CompoArray() As String = Directory.GetDirectories(CompoDirectory)
|
||||
' carico i valori dei bottoni con un preciso ordine
|
||||
For IndexCompoOrder = 0 To DdfFile.CompoListOrder.Count - 1
|
||||
For Index = 0 To CompoArray.Count - 1
|
||||
' apro ogni directory e cerco un file di testo di nome Config.ini
|
||||
Dim CurrCompoPath As String = CompoArray(Index) & "\" & ConstCompo.CONFIGINI_FILE_NAME
|
||||
If File.Exists(CurrCompoPath) Then
|
||||
GetPrivateProfileCompoName(ConstCompo.S_COMPO, ConstCompo.K_NAME, CompoNameDDF, CompoName, CurrCompoPath)
|
||||
If CompoPanelList(IndexCompoOrder) = CompoNameDDF Then
|
||||
m_CompoTypeList.Add(New CompoType(CompoName, CompoNameDDF, CompoArray(Index)))
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
Reference in New Issue
Block a user