Modifiche

This commit is contained in:
Emmanuele Sassi
2021-04-03 18:51:58 +02:00
parent 6483a2812d
commit 7e34c83653
32 changed files with 162 additions and 126 deletions
@@ -29,11 +29,7 @@ Public Class ProjFileVM
Get
Dim sPath As String = String.Empty
If IsNothing(m_ProjFileM.nProjId) OrElse m_ProjFileM.nProjId = 0 Then Return String.Empty
sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & FILENAMESEPARATOR
If Not IsNothing(m_ProjFileM.nProdId) AndAlso m_ProjFileM.nProdId > 0 Then
sPath &= nProdId.ToString("0000")
End If
sPath &= FILENAMESEPARATOR & BTLFileName & ".nge"
sPath = refMainWindowVM.MainWindowM.sProjsDir & "\" & nProjId.ToString("0000") & "\" & nProjId.ToString("0000") & ".nge"
Return sPath
End Get
End Property
@@ -107,18 +103,6 @@ Public Class ProjFileVM
#End Region ' CONSTRUCTORS
Friend Sub SetProdId(nProdId As Integer)
' rinomino proj con riferimento a prod
Dim OldPath As String = sProjPath
'''m_ProjFileM.nProdId = nProdId
Dim NewPath As String = sProjPath
File.Move(OldPath, NewPath)
End Sub
Friend Sub ResetProdId()
SetProdId(0)
End Sub
' funzione che restituisce le parti di nome file
Friend Shared Function VerifyProjectFile(nProjectType As ProjectType, ProjectFileName As String, ByRef nProjId As Integer, ByRef nProdId As Integer, ByRef sBTLFileName As String) As Boolean
If nProjectType = ProjectType.PROJ Then
@@ -229,8 +213,6 @@ Public Class ProjFileVM
Directory.Delete(sProjectDirPath, True)
DbControllers.m_ProjController.DeleteProj(CurrProject.nProjId)
If Type = ProjectType.PROD AndAlso CurrProject.nProdId = Map.refProjManagerVM.CurrProj.nProdId Then
' reset prod in path proj
'''Map.refProjManagerVM.CurrProj.ResetProdId()
End If
CurrProject = Nothing
End If