Optimizer 2.7.11.22

-sistemato gestione visualizzazione strategie forzate
This commit is contained in:
Demetrio Cassarino
2025-12-19 15:39:31 +01:00
parent 71c9815296
commit b128b56c4b
6 changed files with 30 additions and 19 deletions
@@ -149,16 +149,19 @@ Public Class BTLStructureVM
If Not IsNothing(BtlPart) AndAlso Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SelBTLFeatureVM = BtlPart.BTLFeatureVMList(0)
' Mostro le strategie forzate
Dim bValue As Boolean = False
For Each FeatureParam In BtlPart.BTLFeatureVMList
Dim bValueForced As Boolean = False
For Each FeatureParam In SelBTLPart.BTLFeatureVMList
bValue = False
EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue)
If bValue Then FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
For Each StrategySetupParam In Map.refStrategyManagerVM.StrategySetupList
For Each StrategyFeatureParam In StrategySetupParam.StrategyFeatureList
For Each TopologyParam In StrategyFeatureParam.TopologyList
For Each StrategyParam In TopologyParam.StrategyList
EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & "_FORCED", bValue)
If bValue Then FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
For Each Param In StrategyParam.ParameterList
EgtGetInfo(FeatureParam.nFeatureId, StrategyParam.sStrategyId & "_" & Param.sNameNge & "_FORCED", bValue)
If bValue Then FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
bValueForced = False
EgtGetInfo(FeatureParam.nFeatureId, StrategyParam.sStrategyId & "_" & Param.sNameNge & "_FORCED", bValueForced)
If bValueForced Then FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
Next
Next
Next
@@ -834,16 +837,20 @@ Public Class BTLStructureVM
If BTLStructureM.nAsseBaseId = GDB_ID.NULL Then
Map.refShowBeamPanelVM.SetShowBuilding(False)
End If
Dim bValue As Boolean = False
Dim bValueForced As Boolean = False
For Each BTLPart As BTLPartVM In m_BTLPartVMList
For Each GeneralParameter As ProjectParameters In Map.refProdManagerVM.BTLDataWnd.GeneralParametersList
EgtGetInfo(m_BTLStructureM.nBTLInfoId, GeneralParameter.sNameNge & "_FORCED", bValue)
EgtGetInfo(BTLPart.nPartId, GeneralParameter.sNameNge & "_FORCED", bValueForced)
If bValue Then SetGeneralParameters("pack://application:,,,/Resources/NewPage/modify_adjustment.png")
If bValueForced Then BTLPart.SetStrategyModify_Visibility(Visibility.Visible)
If Not IsNothing(Map.refProdManagerVM.BTLDataWnd) Then
Dim bValue As Boolean = False
Dim bValueForced As Boolean = False
For Each BTLPart As BTLPartVM In m_BTLPartVMList
For Each GeneralParameter As ProjectParameters In Map.refProdManagerVM.BTLDataWnd.GeneralParametersList
bValue = False
bValueForced = False
EgtGetInfo(m_BTLStructureM.nBTLInfoId, GeneralParameter.sNameNge & "_FORCED", bValue)
EgtGetInfo(BTLPart.nPartId, GeneralParameter.sNameNge & "_FORCED", bValueForced)
If bValue Then SetGeneralParameters("pack://application:,,,/Resources/NewPage/modify_adjustment.png")
If bValueForced Then BTLPart.SetStrategyModify_Visibility(Visibility.Visible)
Next
Next
Next
End If
End Sub
#End Region ' Constructor
@@ -283,13 +283,15 @@ Public Class ForcedStrategyPanelVM
End If
If Not IsNothing(m_SelStrategy) Then
If m_SelStrategy.sStrategyId = AUTOMATICSTRATEGYID Then
m_SelStrategy.SetbIsStrategyModify(False)
EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY)
EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED")
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Collapsed)
Else
m_SelStrategy.SetbIsStrategyModify(True)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Visible)
EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, SelStrategy.sStrategyId)
EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & "_FORCED", SelStrategy.bIsStrategyModify)
EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED", SelStrategy.bIsStrategyModify)
Dim sInfo As String = String.Empty
For Each Param In SelStrategy.ParameterList
Select Case Param.GetType()
@@ -340,6 +342,7 @@ Public Class ForcedStrategyPanelVM
' Abilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(True)
Map.refProjectVM.SetLeftPanel_Opacity(1)
Map.refSceneHostVM.SaveProject()
End Sub
#End Region ' Ok_Command
@@ -67,5 +67,5 @@ Imports System.Windows
' Revision
'
<Assembly: AssemblyVersion("2.7.11.21")>
<Assembly: AssemblyFileVersion("2.7.11.21")>
<Assembly: AssemblyVersion("2.7.11.22")>
<Assembly: AssemblyFileVersion("2.7.11.22")>
@@ -1048,6 +1048,7 @@ Public Class ProdManagerVM
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
CopyBuilding()
If IsNothing(Map.refProjectVM.BTLStructureVM) Then
m_MruFiles.Remove(sFilePath)
If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso sFilePath <> ProjectManagerVM.CurrProd.sProdPath Then
@@ -4,7 +4,7 @@
xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core"
SizeToContent="WidthAndHeight"
MinWidth="500"
WindowStartupLocation="CenterOwner"
WindowStartupLocation="CenterScreen"
Title="ProjectType"
Style="{StaticResource OptimizerWindow.Dialog.NoClose}">
@@ -71,4 +71,4 @@ Imports System.Windows
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.7.11.21")>
<Assembly: AssemblyFileVersion("2.7.11.10")>
<Assembly: AssemblyFileVersion("2.7.11.21")>