Merge branch 'feature/NewGraphicsProgram' into feature/RipristinoSiemens

This commit is contained in:
Emmanuele Sassi
2026-05-25 07:49:04 +02:00
13 changed files with 114 additions and 30 deletions
+2 -2
View File
@@ -38,5 +38,5 @@ Imports System.Windows
' 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")>
@@ -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")]
@@ -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
@@ -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
@@ -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)
@@ -76,8 +76,8 @@
Style="{StaticResource ProjectParameters_UniformGrid}">
<TextBlock Text="{Binding sDescriptionShort}"
Style="{StaticResource ProjectParameters_TextBlock}"/>
<ComboBox ItemsSource="{Binding ComboList, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelValue, UpdateSourceTrigger=PropertyChanged}"
<ComboBox ItemsSource="{Binding ComboList}"
SelectedItem="{Binding SelValue}"
DisplayMemberPath="sValue"
Style="{StaticResource ProjectParameters_ComboBox}">
</ComboBox>
@@ -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)
@@ -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
@@ -67,5 +67,5 @@ Imports System.Windows
' Revision
'
<Assembly: AssemblyVersion("3.1.4.7")>
<Assembly: AssemblyFileVersion("3.1.4.7")>
<Assembly: AssemblyVersion("3.1.5.2")>
<Assembly: AssemblyFileVersion("3.1.5.2")>
+26 -5
View File
@@ -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)
@@ -1,5 +1,4 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
@@ -514,6 +514,7 @@
<Style x:Key="Rotate_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="TextAlignment" Value="Center"/>
<Setter Property="Width" Value="25"/>
<Setter Property="Margin" Value="2,0,2,0"/>
</Style>
@@ -70,5 +70,5 @@ Imports System.Windows
' 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")>