- correzioni per gestione selezione in OnlyProd

- gestione comune del CurrProj e CurrProd
This commit is contained in:
Emmanuele Sassi
2023-11-13 17:46:27 +01:00
parent 408b59ee9c
commit df46f3b5a5
28 changed files with 512 additions and 404 deletions
@@ -103,8 +103,8 @@ Public Class NewOpenProjectFileDialogVM
' recupero path per verificare esista
If IsNothing(Project.nProdId) OrElse Project.nProdId = 0 Then Continue For
Dim sPath As String = Map.refMainWindowVM.MainWindowM.sProdsDir & "\" & Project.nProdId.ToString("0000") & "\" & Project.nProdId.ToString("0000") & ".nge"
If Project.sMachine = Map.refProjManagerVM.CurrProj.sMachine AndAlso
Project.nType = Map.refProjManagerVM.CurrProj.nType Then
If Project.sMachine = ProjectManagerVM.CurrProj.sMachine AndAlso
Project.nType = ProjectManagerVM.CurrProj.nType Then
If File.Exists(sPath) Then
' m_ProjectList.Add(New ProdItem(New ProdFileVM(Project)))
'Else
@@ -151,7 +151,7 @@ Public Class NewOpenProjectFileDialogVM
' recupero indice per riselezionare
Dim ProjListIndex As Integer = m_ProjectList.IndexOf(SelProject)
' verifico se proj selezionato e' il corrente
If Not IsNothing(Map.refProjManagerVM.CurrProj) AndAlso SelProject.ProjFileList.Any(Function(x) x.nProjId = Map.refProjManagerVM.CurrProj.nProjId) Then
If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso SelProject.ProjFileList.Any(Function(x) x.nProjId = ProjectManagerVM.CurrProj.nProjId) Then
If m_ProjectType = ProjectType.PROJ AndAlso MessageBox.Show(EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Warning) = MessageBoxResult.Cancel Then
Return
Else
@@ -159,7 +159,7 @@ Public Class NewOpenProjectFileDialogVM
End If
End If
' verifico se prod selezionato e' il corrente
If Not IsNothing(Map.refProdManagerVM.CurrProd) AndAlso SelProject.ProdFileVM.nProdId = Map.refProdManagerVM.CurrProd.nProdId Then
If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso SelProject.ProdFileVM.nProdId = ProjectManagerVM.CurrProd.nProdId Then
If m_ProjectType = ProjectType.PROD AndAlso MessageBox.Show(EgtMsg(61872), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Warning) = MessageBoxResult.Cancel Then
Return
Else