- Correzione riferimenti tipo progetto laddove veniva usato ancora tipo macchina
- Aggiunti commenti su aggiunta/rimozione file a lista MRU in base a tipo progetto
This commit is contained in:
@@ -85,7 +85,7 @@ Public Class AddSectionXMaterialWndVM
|
||||
NewSectXMatItem.Alias_IsChecked = False
|
||||
|
||||
For Each SectionListItem In Map.refProjectVM.BTLStructureVM.SectionList
|
||||
If CurrentMachine.nType = MachineType.BEAM Then
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
If NewSectXMatItem.dW = SectionListItem.dW AndAlso NewSectXMatItem.dH = SectionListItem.dH Then
|
||||
' Se le sezioni sono uguali allora indago sui materiali
|
||||
For Index As Integer = 0 To SectionListItem.sMaterial.Count - 1
|
||||
@@ -97,7 +97,7 @@ Public Class AddSectionXMaterialWndVM
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
ElseIf CurrentMachine.nType = MachineType.WALL Then
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
If NewSectXMatItem.dH = SectionListItem.dH Then
|
||||
' Se le sezioni sono uguali allora indago sui materiali
|
||||
For Index As Integer = 0 To SectionListItem.sMaterial.Count - 1
|
||||
@@ -133,11 +133,11 @@ Public Class AddSectionXMaterialWndVM
|
||||
Public Sub Ok()
|
||||
' Se i valori non sono corretti segnalo l'errore e impedisco il salvataggio
|
||||
For Index As Integer = 0 To NewSectionXMaterialList.Count - 1
|
||||
If CurrentMachine.nType = MachineType.BEAM AndAlso NewSectionXMaterialList(Index).dNewL < 0 Then
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM AndAlso NewSectionXMaterialList(Index).dNewL < 0 Then
|
||||
MessageBox.Show(IncorrectValues_Msg, Error_Msg)
|
||||
Return
|
||||
End If
|
||||
If CurrentMachine.nType = MachineType.WALL AndAlso (NewSectionXMaterialList(Index).dNewW < 0 Or NewSectionXMaterialList(Index).dNewL < 0) Then
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL AndAlso (NewSectionXMaterialList(Index).dNewW < 0 Or NewSectionXMaterialList(Index).dNewL < 0) Then
|
||||
MessageBox.Show(IncorrectValues_Msg, Error_Msg)
|
||||
Return
|
||||
End If
|
||||
@@ -164,7 +164,7 @@ Public Class AddSectionXMaterialWndVM
|
||||
|
||||
Dim sWarehousePath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_MEDIUM_INI_FILE_NAME
|
||||
|
||||
If CurrentMachine.nType = MachineType.BEAM Then
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
|
||||
' Ciclo sui parametri L esistenti nell'INI in modo da avere l'indice di partenza per gli ulteriori parametri da scrivere
|
||||
Dim sValue As String = String.Empty
|
||||
@@ -190,7 +190,7 @@ Public Class AddSectionXMaterialWndVM
|
||||
Index += 1
|
||||
ParamIndex += 1
|
||||
Next
|
||||
ElseIf CurrentMachine.nType = MachineType.WALL Then
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
|
||||
' Ciclo sui parametri S esistenti nell'INI in modo da avere l'indice di partenza per gli ulteriori parametri da scrivere
|
||||
Dim sValue As String = String.Empty
|
||||
|
||||
@@ -148,7 +148,7 @@ Public Class LeftPanelVM
|
||||
Dim dStartOffset As Double = 0
|
||||
Dim dKerf As Double = 0
|
||||
Dim sWarehouseIniPath As String = Map.refMainWindowVM.MainWindowM.sWarehouseDir & "\" & WH_BASIC_INI_FILE_NAME
|
||||
If CurrentMachine.nType = MachineType.BEAM Then
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
dStartOffset = EgtUILib.GenInterface.GetPrivateProfileDouble(WRH_BEAM, WRH_STARTOFFSET, 0, sWarehouseIniPath)
|
||||
dRawL += dStartOffset
|
||||
Else
|
||||
|
||||
@@ -495,7 +495,9 @@ Public Class MySceneHostVM
|
||||
Map.refShowBeamPanelVM.ShowAll()
|
||||
End If
|
||||
WriteMainPrivateProfileString(S_GENERAL, K_LASTPROJ, sFile)
|
||||
' in base al tipo progetto aggiungo il file in apertura alla lista degli MRU
|
||||
If ProjectType = ProjectType.PROJ Then
|
||||
' nel caso PROJ ricavo il percorso del file tramite il ProjId
|
||||
Dim PjFileVM As ProjFileVM
|
||||
If Not IsNothing(ProjId) AndAlso ProjId <> 0 Then
|
||||
PjFileVM = New ProjFileVM(DbControllers.m_ProjController.FindByProjIdConv(ProjId))
|
||||
@@ -504,7 +506,9 @@ Public Class MySceneHostVM
|
||||
End If
|
||||
If ProjectType = ProjectType.PROD Then Map.refProdManagerVM.m_MruFiles.Add(sFile)
|
||||
Else
|
||||
' in base al tipo progetto rimuovo il file in apertura dalla lista degli MRU
|
||||
If ProjectType = ProjectType.PROJ Then
|
||||
' nel caso PROJ ricavo il percorso del file tramite il ProjId
|
||||
Dim PjFileVM As ProjFileVM
|
||||
If Not IsNothing(ProjId) AndAlso ProjId <> 0 Then
|
||||
PjFileVM = New ProjFileVM(DbControllers.m_ProjController.FindByProjIdConv(ProjId))
|
||||
@@ -530,7 +534,9 @@ Public Class MySceneHostVM
|
||||
Dim ProjId As Integer = If(ProjectType = ProjectType.PROJ, Map.refProjManagerVM.nLoadingProjId, 0)
|
||||
' Se salvataggio non riuscito, esco subito
|
||||
If Not bOk Then
|
||||
' in base al tipo progetto rimuovo il file in salvataggio dalla lista degli MRU
|
||||
If ProjectType = ProjectType.PROJ Then
|
||||
' nel caso PROJ ricavo il percorso del file tramite il ProjId
|
||||
Dim PjFileVM As ProjFileVM
|
||||
If Not IsNothing(ProjId) AndAlso ProjId <> 0 Then
|
||||
PjFileVM = New ProjFileVM(DbControllers.m_ProjController.FindByProjIdConv(ProjId))
|
||||
@@ -542,8 +548,9 @@ Public Class MySceneHostVM
|
||||
MessageBox.Show(sMsg, EgtMsg(10001), MessageBoxButton.OK, MessageBoxImage.Error) ' Error
|
||||
Return
|
||||
End If
|
||||
' Inserisco nome in MRU
|
||||
' in base al tipo progetto aggiungo il file in salvataggio alla lista degli MRU
|
||||
If ProjectType = ProjectType.PROJ Then
|
||||
' nel caso PROJ ricavo il percorso del file tramite il ProjId
|
||||
Dim PjFileVM As ProjFileVM
|
||||
If Not IsNothing(ProjId) AndAlso ProjId <> 0 Then
|
||||
PjFileVM = New ProjFileVM(DbControllers.m_ProjController.FindByProjIdConv(ProjId))
|
||||
|
||||
Reference in New Issue
Block a user