Aggiornamento Project
This commit is contained in:
@@ -47,8 +47,8 @@ Public Class OpenProjectFileDialogVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_ProjectList As New List(Of ProjectFile)
|
||||
Public ReadOnly Property ProjectList As List(Of ProjectFile)
|
||||
Private m_ProjectList As New List(Of ProjectFileVM)
|
||||
Public ReadOnly Property ProjectList As List(Of ProjectFileVM)
|
||||
Get
|
||||
Return m_ProjectList
|
||||
End Get
|
||||
@@ -58,12 +58,12 @@ Public Class OpenProjectFileDialogVM
|
||||
'End Set
|
||||
End Property
|
||||
|
||||
Private m_SelProject As ProjectFile
|
||||
Public Property SelProject As ProjectFile
|
||||
Private m_SelProject As ProjectFileVM
|
||||
Public Property SelProject As ProjectFileVM
|
||||
Get
|
||||
Return m_SelProject
|
||||
End Get
|
||||
Set(value As ProjectFile)
|
||||
Set(value As ProjectFileVM)
|
||||
m_SelProject = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -96,31 +96,19 @@ Public Class OpenProjectFileDialogVM
|
||||
' Definizione comandi
|
||||
Private m_cmdProjectDoubleClick As ICommand
|
||||
|
||||
Public Function Init(ProjectType As ProjectType, Optional ProjectList As List(Of ProjectFile) = Nothing) As Boolean?
|
||||
Public Function Init(ProjectType As ProjectType, Optional ProjectList As List(Of ProjectFileVM) = Nothing) As Boolean?
|
||||
m_ProjectType = ProjectType
|
||||
If IsNothing(ProjectList) OrElse ProjectList.Count = 0 Then
|
||||
' leggo da db
|
||||
Dim DbProjectList As New List(Of Core.ProjectFile)
|
||||
Dim DbProjectList As New List(Of Core.ProjectFileM)
|
||||
If ProjectType = ProjectType.PROJ Then
|
||||
DbProjectList = DbControllers.m_ProjController.GetLastDesc(50)
|
||||
ElseIf ProjectType = ProjectType.PROD Then
|
||||
DbProjectList = DbControllers.m_ProdController.GetLastDesc(50)
|
||||
End If
|
||||
For Each Project In DbProjectList
|
||||
m_ProjectList.Add(New ProjectFile(Project.nProjectType, Project.nProjId, Project.nProdId, Project.BTLFileName))
|
||||
m_ProjectList.Add(New ProjectFileVM(Project))
|
||||
Next
|
||||
'' cartella da cui leggere i programmi
|
||||
'Dim sFolderPath As String
|
||||
'If m_ProjectType = ProjectType.PROJ Then
|
||||
' sFolderPath = Map.refMainWindowVM.MainWindowM.sProjsDir
|
||||
'Else
|
||||
' sFolderPath = Map.refMainWindowVM.MainWindowM.sProdsDir
|
||||
'End If
|
||||
'' leggo i file che contiene
|
||||
'Dim AllDirsInDir As IEnumerable(Of String) = IO.Directory.EnumerateDirectories(sFolderPath)
|
||||
'For Each CurrDirectory In AllDirsInDir
|
||||
' VerifyFiles(CurrDirectory)
|
||||
'Next
|
||||
Else
|
||||
m_ProjectList = ProjectList
|
||||
End If
|
||||
@@ -133,8 +121,8 @@ Public Class OpenProjectFileDialogVM
|
||||
Dim nProjId As Integer = 0
|
||||
Dim nProdId As Integer = 0
|
||||
Dim sBTLFileName As String = ""
|
||||
If ProjectFile.VerifyProjectFile(m_ProjectType, Path.GetFileNameWithoutExtension(File), nProjId, nProdId, sBTLFileName) Then
|
||||
m_ProjectList.Add(New ProjectFile(m_ProjectType, nProjId, nProdId, sBTLFileName))
|
||||
If ProjectFileVM.VerifyProjectFile(m_ProjectType, Path.GetFileNameWithoutExtension(File), nProjId, nProdId, sBTLFileName) Then
|
||||
m_ProjectList.Add(New ProjectFileVM(m_ProjectType, nProjId, nProdId, sBTLFileName))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Reference in New Issue
Block a user