-rimosso distinzione tra view, machining page

This commit is contained in:
Demetrio Cassarino
2025-04-22 16:46:32 +02:00
parent 06899fadfd
commit 8b36b65b37
21 changed files with 468 additions and 460 deletions
@@ -163,16 +163,17 @@ Public Class NewOpenProjectFileDialogVM
End If
' rimuovo da lista ultimi progetti aperti
For Each Project In SelProject.ProjFileList
If Not IsNothing(Map.refProjManagerVM) Then
Map.refProjManagerVM.m_MruFiles.Remove(Project.sProjPath)
Else
Map.refOnlyProdManagerVM.m_MruFiles.Remove(Project.sProjPath)
End If
'If Not IsNothing(Map.refProjManagerVM) Then
' Map.refProjManagerVM.m_MruFiles.Remove(Project.sProjPath)
'Else
' Map.refOnlyProdManagerVM.m_MruFiles.Remove(Project.sProjPath)
'End If
Map.refOnlyProdManagerVM.m_MruFiles.Remove(Project.sProjPath)
Next
Map.refProjManagerVM.NotifyPropertyChanged(NameOf(Map.refProjManagerVM.MruFileNames))
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refOnlyProdManagerVM.MruFileNames))
If Not IsNothing(SelProject.ProdFileVM) Then
Map.refProdManagerVM.m_MruFiles.Remove(SelProject.ProdFileVM.sProdPath)
Map.refProdManagerVM.NotifyPropertyChanged(NameOf(Map.refProdManagerVM.MruFileNames))
Map.refOnlyProdManagerVM.m_MruFiles.Remove(SelProject.ProdFileVM.sProdPath)
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refOnlyProdManagerVM.MruFileNames))
End If
' cancello progetto
If Not IsNothing(SelProject.ProdFileVM) Then
@@ -196,25 +197,24 @@ Public Class NewOpenProjectFileDialogVM
Public Overrides Sub Cancel()
If m_ChangeOpenedProjectOnCancel Then
Dim bOpened As Boolean = False
If m_ProjectType = ProjectType.PROJ Then
For Each ProjectName In Map.refProjManagerVM.m_MruFiles.FileNames
If Not String.IsNullOrWhiteSpace(ProjectName) Then
Dim sProjId As String = Path.GetFileNameWithoutExtension(ProjectName)
If Not String.IsNullOrWhiteSpace(sProjId) Then
Dim nProjId As Integer = 0
Integer.TryParse(sProjId, nProjId)
Dim PjFileM = DbControllers.m_ProjController.FindByProjIdConv(nProjId)
Dim PjFileVM = New ProjFileVM(PjFileM)
Map.refProjManagerVM.OpenProject(PjFileVM)
bOpened = True
Exit For
End If
End If
Next
If Not bOpened Then
Map.refProjManagerVM.OpenProject(m_ProjectList(0).ProjFileList(0))
End If
ElseIf m_ProjectType = ProjectType.PROD Then
'If m_ProjectType = ProjectType.PROJ Then
' For Each ProjectName In Map.refProjManagerVM.m_MruFiles.FileNames
' If Not String.IsNullOrWhiteSpace(ProjectName) Then
' Dim sProjId As String = Path.GetFileNameWithoutExtension(ProjectName)
' If Not String.IsNullOrWhiteSpace(sProjId) Then
' Dim nProjId As Integer = 0
' Integer.TryParse(sProjId, nProjId)
' Dim PjFileM = DbControllers.m_ProjController.FindByProjIdConv(nProjId)
' Dim PjFileVM = New ProjFileVM(PjFileM)
' Map.refProjManagerVM.OpenProject(PjFileVM)
' bOpened = True
' Exit For
' End If
' End If
' If Not bOpened Then
' Map.refProjManagerVM.OpenProject(m_ProjectList(0).ProjFileList(0))
' End If
If m_ProjectType = ProjectType.PROD Then
For Each ProjectName In Map.refProdManagerVM.m_MruFiles.FileNames
If Not String.IsNullOrWhiteSpace(ProjectName) Then
Dim sProdId As String = Path.GetFileNameWithoutExtension(ProjectName)