diff --git a/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb b/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb index 9bc0945e..31f41472 100644 --- a/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb @@ -38,5 +38,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs b/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs index 7e6598e8..0b2c9fdb 100644 --- a/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs +++ b/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.1.4.7")] -[assembly: AssemblyFileVersion("3.1.4.7")] +[assembly: AssemblyVersion("3.1.5.2")] +[assembly: AssemblyFileVersion("3.1.5.2")] diff --git a/EgtBEAMWALL.Optimizer/BTLPartManager/BTLPartManagerVM.vb b/EgtBEAMWALL.Optimizer/BTLPartManager/BTLPartManagerVM.vb index 068fcc2d..13f9cc3a 100644 --- a/EgtBEAMWALL.Optimizer/BTLPartManager/BTLPartManagerVM.vb +++ b/EgtBEAMWALL.Optimizer/BTLPartManager/BTLPartManagerVM.vb @@ -391,6 +391,13 @@ Public Class BTLPartManagerVM Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart If IsNothing(SelPart) Then Return If SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then + ' Resetto info + If MyExecProcessManager.sInfoNgePartList.Count > 0 Then + For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList + Dim sInfoNgePart As String() = InfoNgePart.Split("="c) + EgtRemoveInfo(SelPart.nPartId, sInfoNgePart(0)) + Next + End If SelPart.ResetCalcTotalPart() End If End Sub diff --git a/EgtBEAMWALL.Optimizer/BTLViewModel/BTLPartVM.vb b/EgtBEAMWALL.Optimizer/BTLViewModel/BTLPartVM.vb index ecd4aa94..cfc2ce66 100644 --- a/EgtBEAMWALL.Optimizer/BTLViewModel/BTLPartVM.vb +++ b/EgtBEAMWALL.Optimizer/BTLViewModel/BTLPartVM.vb @@ -1683,6 +1683,13 @@ Public Class BTLPartVM Set(value As Boolean) ' eseguo inversione m_BTLPartM.Inversion(Map.refProjectVM.BTLStructureVM.nPROJTYPE) + ' Resetto info + If MyExecProcessManager.sInfoNgePartList.Count > 0 Then + For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList + Dim sInfoNgePart As String() = InfoNgePart.Split("="c) + EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0)) + Next + End If ' setto part e tutte le feature da ricalcolare ResetCalcTotalPart() EgtDraw() @@ -1873,7 +1880,16 @@ Public Class BTLPartVM NotifyPropertyChanged(NameOf(sH)) NotifyPropertyChanged(NameOf(sL)) ' setto part e tutte le feature da ricalcolare - If Not bResetCalc Then ResetCalcTotalPart() + If bResetCalc Then + ' Resetto info + If MyExecProcessManager.sInfoNgePartList.Count > 0 Then + For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList + Dim sInfoNgePart As String() = InfoNgePart.Split("="c) + EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0)) + Next + End If + ResetCalcTotalPart() + End If ' aggiorno sezioni Map.refProjectVM.BTLStructureVM.UpdateSection(Section, OldSection) End If diff --git a/EgtBEAMWALL.Optimizer/ExecProcessManager/MyExecProcessManager.vb b/EgtBEAMWALL.Optimizer/ExecProcessManager/MyExecProcessManager.vb index 41725c71..ff40f63e 100644 --- a/EgtBEAMWALL.Optimizer/ExecProcessManager/MyExecProcessManager.vb +++ b/EgtBEAMWALL.Optimizer/ExecProcessManager/MyExecProcessManager.vb @@ -1,5 +1,4 @@ Imports System.IO -Imports EgtBEAMWALL.Core.ConstBeam Imports EgtBEAMWALL.Core.ConstIni Imports EgtUILib Imports EgtWPFLib5 @@ -16,6 +15,13 @@ Module MyExecProcessManager End Get End Property + Private m_sInfoNgePartList As New List(Of String) + Public ReadOnly Property sInfoNgePartList As List(Of String) + Get + Return m_sInfoNgePartList + End Get + End Property + Friend Function Init() As Boolean ' creazione manager dei processi Dim sCamExePath As String = "" @@ -68,6 +74,7 @@ Module MyExecProcessManager End Function Private Sub ExecProcessManager_AnswerReceived(Answer As AnswerDTO) + m_sInfoNgePartList.Clear() Map.refMyStatusBarVM.SetLoadingProgress_Visibility(True) Dim sBarPath As String = Answer.Args("BarPath") Dim nProgramPage As Integer = -1 @@ -77,19 +84,35 @@ Module MyExecProcessManager EgtOutLog("Risultato progetto " & nBarId) CALCPanelVM.ProcessResults(sBarPath, nProgramPage, nBarId) If Answer.Args.Count > 4 Then + Dim PartItem As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nBarId) Dim nPreInvert As Integer = -1 Dim bPreInvert As Boolean = False - Integer.TryParse(Answer.Args("PREINVERT"), nPreInvert) - If nPreInvert = 1 Then bPreInvert = True - Dim nPreRotate As Integer = -1 - Integer.TryParse(Answer.Args("PREROTATE90"), nPreRotate) - Dim dAng As Integer = nPreRotate * 90 - Dim BTLPartItem As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nBarId) - If nPreInvert > 0 Then - If BTLPartItem.IsInverted Then bPreInvert = False - BTLPartItem.SetInverted(bPreInvert) + If Answer.Args.ContainsKey("PREINVERT") Then + Integer.TryParse(Answer.Args("PREINVERT"), nPreInvert) End If - If nPreRotate > 0 Then BTLPartItem.ForwardRotation(True, True, dAng, False) + Dim nPreRotate As Integer = -1 + If Answer.Args.ContainsKey("PREROTATE90") Then + Integer.TryParse(Answer.Args("PREROTATE90"), nPreRotate) + End If + If nPreInvert > 0 Then + If nPreInvert = 1 Then bPreInvert = True + If PartItem.IsInverted Then bPreInvert = False + PartItem.SetInverted(bPreInvert) + End If + If nPreRotate > 0 Then + Dim dAng As Integer = nPreRotate * 90 + PartItem.ForwardRotation(True, True, dAng, False) + End If + + Dim prefix As String = "INFONGEPART_" + + m_sInfoNgePartList = Answer.Args.Where(Function(k) k.Key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)).Select(Function(k) k.Value).ToList() + + For Each InfoNgePartItem As String In sInfoNgePartList + Dim sKeyVal() As String = InfoNgePartItem.Trim().Split("="c) + EgtSetInfo(PartItem.nPartId, sKeyVal(0), sKeyVal(1)) + Next + End If ' Gestione progressbar per verificare l'inizio e la fine della verifica Dim BeamManager As ExecProcessManager = m_ExecProcessManagerList(EXECENVIRONMENTS.BEAM) diff --git a/EgtBEAMWALL.Optimizer/GeneralParametersStrategy/ProjectParametersV.xaml b/EgtBEAMWALL.Optimizer/GeneralParametersStrategy/ProjectParametersV.xaml index f31ba8b8..4fe54144 100644 --- a/EgtBEAMWALL.Optimizer/GeneralParametersStrategy/ProjectParametersV.xaml +++ b/EgtBEAMWALL.Optimizer/GeneralParametersStrategy/ProjectParametersV.xaml @@ -76,8 +76,8 @@ Style="{StaticResource ProjectParameters_UniformGrid}"> - diff --git a/EgtBEAMWALL.Optimizer/ItemParamList/PParameterListVM.vb b/EgtBEAMWALL.Optimizer/ItemParamList/PParameterListVM.vb index 70b1cc99..1be30dce 100644 --- a/EgtBEAMWALL.Optimizer/ItemParamList/PParameterListVM.vb +++ b/EgtBEAMWALL.Optimizer/ItemParamList/PParameterListVM.vb @@ -141,9 +141,19 @@ Public Class PParameterListVM End Property Public Sub Ok() - Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature() - Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart() + If Map.refProjectVM.BTLStructureVM.SelBTLPart.nGlobalState <> CalcStates.NOTCALCULATED Then + ' Resetto info + If MyExecProcessManager.sInfoNgePartList.Count > 0 Then + For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList + Dim sInfoNgePart As String() = InfoNgePart.Split("="c) + EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0)) + Next + End If + Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart() + Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature() + End If Map.refForcedStrategyPanelVM.ForcedStrategy() + Map.refProjectVM.SetRawPartManagerVisibility(True) Map.refProjectVM.SetStrategyManagerVisibility(False) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER) diff --git a/EgtBEAMWALL.Optimizer/LeftPanel/LeftPanelVM.vb b/EgtBEAMWALL.Optimizer/LeftPanel/LeftPanelVM.vb index 982b7775..1a0293ed 100644 --- a/EgtBEAMWALL.Optimizer/LeftPanel/LeftPanelVM.vb +++ b/EgtBEAMWALL.Optimizer/LeftPanel/LeftPanelVM.vb @@ -355,6 +355,13 @@ Public Class LeftPanelVM Map.refCALCPanelVM.SetCalculating(False) For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList If Part.nGlobalState <> CalcStates.NOTCALCULATED Then + ' Resetto info + If MyExecProcessManager.sInfoNgePartList.Count > 0 Then + For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList + Dim sInfoNgePart As String() = InfoNgePart.Split("="c) + EgtRemoveInfo(Part.nPartId, sInfoNgePart(0)) + Next + End If ' resetto stato dei calcoli Part.ResetCalcTotalPart() End If diff --git a/EgtBEAMWALL.Optimizer/My Project/AssemblyInfo.vb b/EgtBEAMWALL.Optimizer/My Project/AssemblyInfo.vb index ffd1bf89..d80e9ab8 100644 --- a/EgtBEAMWALL.Optimizer/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.Optimizer/My Project/AssemblyInfo.vb @@ -67,5 +67,5 @@ Imports System.Windows ' Revision ' - - + + diff --git a/EgtBEAMWALL.Optimizer/Project/ProjectVM.vb b/EgtBEAMWALL.Optimizer/Project/ProjectVM.vb index 63315ad1..b97c0dcf 100644 --- a/EgtBEAMWALL.Optimizer/Project/ProjectVM.vb +++ b/EgtBEAMWALL.Optimizer/Project/ProjectVM.vb @@ -696,7 +696,7 @@ Public Class ProjectVM EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sTmpValueInfo) DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo) Else - DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue + DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpComboValue) SetGeneralParameters(False) End If Case GetType(StringGenericParameter) @@ -823,7 +823,12 @@ Public Class ProjectVM Dim sTmpStrategySetup As String = String.Empty Dim nBTLInfoLayerId As Integer = 0 If bValuePart Then - EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup) + If m_SelStrategySetup Is String.Empty Then + nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO) + EgtGetInfo(nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup) + Else + EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup) + End If Else nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO) EgtGetInfo(nBTLInfoLayerId, AI_SETUP, sStrategyBTLSetup) @@ -1029,7 +1034,14 @@ Public Class ProjectVM Public Sub Ok() NotifyPropertyChanged(NameOf(GeneralParametersList)) - EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup) + If m_SelStrategySetup Is String.Empty Then + Dim nBTLInfoLayerId As Integer = 0 + nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO) + EgtGetInfo(nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup) + EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup) + Else + EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup) + End If Dim sInfo As String = String.Empty If m_bSaveGeneralParameters Then For Each GeneralParameter In m_GeneralParametersList @@ -1083,8 +1095,17 @@ Public Class ProjectVM Next m_BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(False) End If - If Not IsNothing(m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature() - Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart() + If Map.refProjectVM.BTLStructureVM.SelBTLPart.nGlobalState <> CalcStates.NOTCALCULATED Then + ' Resetto info + If MyExecProcessManager.sInfoNgePartList.Count > 0 Then + For Each InfoNgePart As String In MyExecProcessManager.sInfoNgePartList + Dim sInfoNgePart As String() = InfoNgePart.Split("="c) + EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId, sInfoNgePart(0)) + Next + End If + Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart() + If Not IsNothing(m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature() + End If If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then UpdatePart(m_BTLStructureVM.SelBTLPart.nPartId) SetRawPartManagerVisibility(True) SetStrategyManagerVisibility(False) diff --git a/EgtBEAMWALL.Optimizer/Statistics/StatisticsVM.vb b/EgtBEAMWALL.Optimizer/Statistics/StatisticsVM.vb index 1fa23d04..464ad05b 100644 --- a/EgtBEAMWALL.Optimizer/Statistics/StatisticsVM.vb +++ b/EgtBEAMWALL.Optimizer/Statistics/StatisticsVM.vb @@ -1,5 +1,4 @@ Imports System.Collections.ObjectModel -Imports System.IO Imports EgtBEAMWALL.Core Imports EgtUILib Imports EgtWPFLib5 diff --git a/EgtBEAMWALL.Optimizer/Utility/Dictionary.xaml b/EgtBEAMWALL.Optimizer/Utility/Dictionary.xaml index 166755db..62cb53aa 100644 --- a/EgtBEAMWALL.Optimizer/Utility/Dictionary.xaml +++ b/EgtBEAMWALL.Optimizer/Utility/Dictionary.xaml @@ -514,6 +514,7 @@ diff --git a/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb b/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb index 89845bf2..e84fd6a4 100644 --- a/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + +