- modifiche selezione, da rivedere
This commit is contained in:
@@ -548,7 +548,7 @@ Public Class BTLFeatureM
|
||||
EgtSetInfo( nFeatureId, BTL_FTR_PRIORITY, nPriority)
|
||||
SetFeatureId(nFeatureId)
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(ParentPart.nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(ParentPart.nPartId)
|
||||
bOk = True
|
||||
Else
|
||||
' Impossibile creare una feature con questi valori - ERRORE
|
||||
|
||||
@@ -1242,7 +1242,7 @@ Public Class BTLPartM
|
||||
m_nROTATED = If(dNewRotation >= 0, dNewRotation, 360 + dNewRotation)
|
||||
EgtSetInfo(nPartId, BTL_PRT_ROTATED, m_nROTATED)
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(nPartId)
|
||||
End If
|
||||
' se era invertito
|
||||
If bInverted Then
|
||||
@@ -1275,7 +1275,7 @@ Public Class BTLPartM
|
||||
m_nINVERTED = If(m_nINVERTED = 0, 180, 0)
|
||||
EgtSetInfo(nPartId, BTL_PRT_INVERTED, m_nINVERTED)
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(nPartId)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -264,6 +264,9 @@ Public Class BTLFeatureVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub RefreshFeature()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
End Class
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
<DependentUpon>NewOpenProjectFileDialogV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NewOpenProjectFileDialog\NewOpenProjectFileDialogVM.vb" />
|
||||
<Compile Include="Utility\Configuration.vb" />
|
||||
<Compile Include="Utility\DimensionsIniFile.vb" />
|
||||
<Compile Include="Utility\Enum.vb" />
|
||||
<Compile Include="MachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||
|
||||
@@ -22,7 +22,7 @@ Public Class MyMachGroupPanelM
|
||||
' Assegno macchina di default
|
||||
NewMyMachGroupPanelM.m_DefaultMachine = ""
|
||||
' aggiorno copie
|
||||
UpdateDuplo()
|
||||
UpdateAllDuplo()
|
||||
' recupero i MachGroup
|
||||
NewMyMachGroupPanelM.m_MachGroupMList = LoadMyMachGroups(MachineList)
|
||||
Return NewMyMachGroupPanelM
|
||||
@@ -167,7 +167,7 @@ Public Class MyMachGroupPanelM
|
||||
End Function
|
||||
|
||||
' funzione che fa l'update di tutte le copie dei pezzi modificati
|
||||
Public Shared Sub UpdateDuplo()
|
||||
Public Shared Sub UpdateAllDuplo()
|
||||
' verifico tipo di progetto
|
||||
Dim nBtlInfoId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
Dim nBWType As Integer = 0
|
||||
@@ -178,148 +178,7 @@ Public Class MyMachGroupPanelM
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim bIsModified As Boolean = False
|
||||
If EgtDuploGetModified(nPartId, bIsModified) AndAlso bIsModified Then
|
||||
' verifico se c'é PRID sugli outline
|
||||
Dim nPRId As Integer = 1
|
||||
Dim nOutlineLayer As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
If EgtExistsInfo(nOutlineId, MGR_FTR_PRC) Then
|
||||
If EgtExistsInfo(nOutlineId, MGR_FTR_PRID) Then
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
Continue While
|
||||
Else
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
|
||||
nPRId += 1
|
||||
End If
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
bTotIsModified = True
|
||||
Dim DuploList As New List(Of Integer)
|
||||
EgtDuploList(nPartId, DuploList)
|
||||
Dim DuploArray() As Integer
|
||||
Dim RotArray(DuploList.Count) As Integer
|
||||
Dim FlipArray(DuploList.Count) As Integer
|
||||
Dim QArray(DuploList.Count) As Dictionary(Of String, Dictionary(Of String, String))
|
||||
DuploArray = DuploList.ToArray()
|
||||
' recupero ROT (gradi) e FLIP (0/1) per non perderli
|
||||
For Duploindex = 0 To DuploArray.Length - 1
|
||||
RotArray(Duploindex) = 0
|
||||
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex))
|
||||
FlipArray(Duploindex) = 0
|
||||
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
|
||||
If FlipArray(Duploindex) <> 0 Then FlipArray(Duploindex) = 180
|
||||
If nBWType = BWType.WALL Then
|
||||
' salvo parametri Q
|
||||
QArray(Duploindex) = New Dictionary(Of String, Dictionary(Of String, String))
|
||||
' ciclo sugli outline
|
||||
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
Dim nGlobPRId As Integer = 1
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
If Not EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
|
||||
nPRId = nGlobPRId
|
||||
nGlobPRId += 1
|
||||
End If
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
|
||||
For QIndex = 1 To 10
|
||||
Dim QKey As String = "Q" & QIndex.ToString("D2")
|
||||
Dim QValue As Integer = 0
|
||||
If EgtGetInfo(nOutlineId, QKey, QValue) Then
|
||||
QArray(Duploindex)(sKey).Add(QKey, QValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
' ciclo sulle feature
|
||||
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
|
||||
If nFeatureLayer <> GDB_ID.NULL Then
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
|
||||
For QIndex = 1 To 10
|
||||
Dim QKey As String = "Q" & QIndex.ToString("D2")
|
||||
Dim QValue As Integer = 0
|
||||
If EgtGetInfo(nFeatureId, QKey, QValue) Then
|
||||
QArray(Duploindex)(sKey).Add(QKey, QValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' aggiornamento dei Duplo
|
||||
EgtDuploUpdate(nPartId)
|
||||
' ripristino i valori di ROT e FLIP
|
||||
For Duploindex = 0 To DuploArray.Length - 1
|
||||
' ripristino info rot e flip
|
||||
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex))
|
||||
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
|
||||
If nBWType = BWType.WALL Then
|
||||
' ciclo sugli outline
|
||||
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
' ripristino parametri Q
|
||||
If QArray(Duploindex).ContainsKey(sKey) Then
|
||||
For Each QPar In QArray(Duploindex)(sKey)
|
||||
EgtSetInfo(nOutlineId, QPar.Key, QPar.Value)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
' ciclo sulle feature
|
||||
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
|
||||
If nFeatureLayer <> GDB_ID.NULL Then
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
' ripristino parametri Q
|
||||
If QArray(Duploindex).ContainsKey(sKey) Then
|
||||
For Each QPar In QArray(Duploindex)(sKey)
|
||||
EgtSetInfo(nFeatureId, QPar.Key, QPar.Value)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
UpdateDuplo(nPartId)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
@@ -330,6 +189,180 @@ Public Class MyMachGroupPanelM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Sub UpdateDuplo(nPartId As Integer)
|
||||
' verifico tipo di progetto
|
||||
Dim nBtlInfoId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
|
||||
Dim nBWType As Integer = 0
|
||||
EgtGetInfo(nBtlInfoId, BTL_GEN_PROJTYPE, nBWType)
|
||||
' ciclo sui pezzi
|
||||
Dim bTotIsModified As Boolean = False
|
||||
Dim bIsModified As Boolean = False
|
||||
' verifico se c'é PRID sugli outline
|
||||
Dim nPRId As Integer = 1
|
||||
Dim nOutlineLayer As Integer = EgtGetFirstNameInGroup(nPartId, OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
If EgtExistsInfo(nOutlineId, MGR_FTR_PRC) Then
|
||||
If EgtExistsInfo(nOutlineId, MGR_FTR_PRID) Then
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
Continue While
|
||||
Else
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
|
||||
nPRId += 1
|
||||
End If
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
bTotIsModified = True
|
||||
Dim DuploList As New List(Of Integer)
|
||||
EgtDuploList(nPartId, DuploList)
|
||||
Dim DuploArray() As Integer
|
||||
Dim RotArray(DuploList.Count) As Integer
|
||||
Dim FlipArray(DuploList.Count) As Integer
|
||||
Dim QArray(DuploList.Count) As Dictionary(Of String, Dictionary(Of String, String))
|
||||
DuploArray = DuploList.ToArray()
|
||||
' recupero ROT (gradi) e FLIP (0/1) per non perderli
|
||||
For Duploindex = 0 To DuploArray.Length - 1
|
||||
RotArray(Duploindex) = 0
|
||||
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex))
|
||||
FlipArray(Duploindex) = 0
|
||||
EgtGetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
|
||||
If FlipArray(Duploindex) <> 0 Then FlipArray(Duploindex) = 180
|
||||
If nBWType = BWType.WALL Then
|
||||
' salvo parametri Q
|
||||
QArray(Duploindex) = New Dictionary(Of String, Dictionary(Of String, String))
|
||||
' ciclo sugli outline
|
||||
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
Dim nGlobPRId As Integer = 1
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
If Not EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId) Then
|
||||
EgtSetInfo(nOutlineId, MGR_FTR_PRID, nGlobPRId)
|
||||
nPRId = nGlobPRId
|
||||
nGlobPRId += 1
|
||||
End If
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
|
||||
For QIndex = 1 To 10
|
||||
Dim QKey As String = "Q" & QIndex.ToString("D2")
|
||||
Dim QValue As Integer = 0
|
||||
If EgtGetInfo(nOutlineId, QKey, QValue) Then
|
||||
QArray(Duploindex)(sKey).Add(QKey, QValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
' ciclo sulle feature
|
||||
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
|
||||
If nFeatureLayer <> GDB_ID.NULL Then
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
QArray(Duploindex).Add(sKey, New Dictionary(Of String, String))
|
||||
For QIndex = 1 To 10
|
||||
Dim QKey As String = "Q" & QIndex.ToString("D2")
|
||||
Dim QValue As Integer = 0
|
||||
If EgtGetInfo(nFeatureId, QKey, QValue) Then
|
||||
QArray(Duploindex)(sKey).Add(QKey, QValue)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' aggiornamento dei Duplo
|
||||
EgtDuploUpdate(nPartId)
|
||||
' ripristino i valori di ROT e FLIP
|
||||
For Duploindex = 0 To DuploArray.Length - 1
|
||||
' ripristino info rot e flip
|
||||
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_ROT, RotArray(Duploindex))
|
||||
EgtSetInfo(DuploArray(Duploindex), MGR_PRT_FLIP, FlipArray(Duploindex))
|
||||
If nBWType = BWType.WALL Then
|
||||
' ciclo sugli outline
|
||||
nOutlineLayer = EgtGetFirstNameInGroup(DuploArray(Duploindex), OUTLINE)
|
||||
If nOutlineLayer <> GDB_ID.NULL Then
|
||||
Dim nOutlineId As Integer = EgtGetFirstInGroup(nOutlineLayer)
|
||||
While nOutlineId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nOutlineId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nOutlineId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
' ripristino parametri Q
|
||||
If QArray(Duploindex).ContainsKey(sKey) Then
|
||||
For Each QPar In QArray(Duploindex)(sKey)
|
||||
EgtSetInfo(nOutlineId, QPar.Key, QPar.Value)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nOutlineId = EgtGetNext(nOutlineId)
|
||||
End While
|
||||
End If
|
||||
' ciclo sulle feature
|
||||
Dim nFeatureLayer As Integer = EgtGetFirstNameInGroup(DuploArray(Duploindex), PROCESSINGS)
|
||||
If nFeatureLayer <> GDB_ID.NULL Then
|
||||
Dim nFeatureId As Integer = EgtGetFirstInGroup(nFeatureLayer)
|
||||
While nFeatureId <> GDB_ID.NULL
|
||||
' verifico che sia feature
|
||||
Dim nPRC As Integer
|
||||
If EgtGetInfo(nFeatureId, MGR_FTR_PRC, nPRC) Then
|
||||
nPRId = 0
|
||||
EgtGetInfo(nFeatureId, MGR_FTR_PRID, nPRId)
|
||||
Dim sKey As String = nPRId & "." & nPRC
|
||||
' ripristino parametri Q
|
||||
If QArray(Duploindex).ContainsKey(sKey) Then
|
||||
For Each QPar In QArray(Duploindex)(sKey)
|
||||
EgtSetInfo(nFeatureId, QPar.Key, QPar.Value)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nFeatureId = EgtGetNext(nFeatureId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Sub SetDuploModified(nPartId As Integer)
|
||||
If Configuration.bOnlyProd Then
|
||||
' segno modificato e aggiorno duplo
|
||||
EgtDuploSetModified(nPartId)
|
||||
UpdateDuplo(nPartId)
|
||||
' aggiorno grafica duplo
|
||||
Dim DuploIdList As New List(Of Integer)
|
||||
EgtDuploList(nPartId, DuploIdList)
|
||||
Dim DuploList As List(Of MachGroupVM) = CoreMap.refMachGroupPanelVM.MachGroupVMList.Where(Function(x) tt(x, DuploIdList)).ToList()
|
||||
For Each CurrMachGroup As MyMachGroupVM In DuploList
|
||||
CurrMachGroup.RefreshMachGroup()
|
||||
Next
|
||||
Else
|
||||
EgtDuploSetModified(nPartId)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Shared Function tt(x As MachGroupVM, DuploIdList As List(Of Integer)) As Boolean
|
||||
Dim TempMyMachGroupVM As MyMachGroupVM = DirectCast(x, MyMachGroupVM)
|
||||
Return TempMyMachGroupVM.PartVMList.Any(Function(y) DuploIdList.Contains(y.nPartId))
|
||||
End Function
|
||||
|
||||
Class DuploFeature
|
||||
' Id geometrico della feature
|
||||
Friend nFeatureId As Integer
|
||||
|
||||
@@ -639,6 +639,10 @@ Public Class PartM
|
||||
Return New List(Of BTLFeatureM)(m_FeatureMList)
|
||||
End Function
|
||||
|
||||
Public Sub RefreshBTLFeatures()
|
||||
m_FeatureMList = LoadBTLFeatures(Me, nPartId)
|
||||
End Sub
|
||||
|
||||
#End Region ' Features
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
@@ -91,7 +91,7 @@ Public MustInherit Class MyMachGroupPanelVM
|
||||
' Svuoto precedente lista di MachGroup
|
||||
MachGroupVMList.Clear()
|
||||
' aggiorno copie
|
||||
MyMachGroupPanelM.UpdateDuplo()
|
||||
MyMachGroupPanelM.UpdateAllDuplo()
|
||||
' verifico se esistono già gruppi di lavorazione o se devo creare il primo
|
||||
Dim bOk As Boolean = False
|
||||
Dim nId = EgtGetFirstMachGroup()
|
||||
|
||||
@@ -620,6 +620,10 @@ Public MustInherit Class MyMachGroupVM
|
||||
|
||||
Public MustOverride Sub RefreshPartList()
|
||||
|
||||
Public Overridable Sub RefreshMachGroup()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' Parts
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
@@ -509,6 +509,10 @@ Public MustInherit Class PartVM
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Overridable Sub RefreshPart()
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "Feature"
|
||||
|
||||
Protected MustOverride Sub CreateBTLFeatureVMList()
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
Public Module Configuration
|
||||
|
||||
Private m_bOnlyProd As Boolean
|
||||
Public ReadOnly Property bOnlyProd As Boolean
|
||||
Get
|
||||
Return m_bOnlyProd
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetOnlyProd(value As Boolean)
|
||||
m_bOnlyProd = value
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
@@ -501,7 +501,7 @@ Public Class BTLPartManagerVM
|
||||
Dim CurrSParam = Nothing
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
' creo sParam
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then CurrSParam = New SParam(Map.refProjectVM.BTLStructureVM.SelBTLPart.Section, dRawL, nQuantity, False)
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLParts(0)) Then CurrSParam = New SParam(Map.refProjectVM.BTLStructureVM.SelBTLParts(0).Section, dRawL, nQuantity, False)
|
||||
Dim sL As String = String.Empty
|
||||
sL = LenToString(CurrSParam.dL, 3)
|
||||
' ricavo l'indice del SecionXMaterial dalla Beam_List
|
||||
|
||||
@@ -128,7 +128,7 @@ Public Class BTLFeatureVM
|
||||
' se in View
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(m_BTLPartM.nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(m_BTLPartM.nPartId)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -163,9 +163,10 @@ Public Class BTLFeatureVM
|
||||
' setto feature da ricalcolare
|
||||
ResetCalcFeature()
|
||||
' se in View
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse (Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Not IsNothing(m_BTLPartM)) Then
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(m_BTLPartM.nPartId)
|
||||
Dim cc = Map.refMachGroupPanelVM.MachGroupVMList
|
||||
MyMachGroupPanelM.SetDuploModified(m_BTLPartM.nPartId)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(bDO))
|
||||
' aggiorno messaggio su context menu
|
||||
@@ -405,6 +406,28 @@ Public Class BTLFeatureVM
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Public Overrides Sub RefreshFeature()
|
||||
' leggo gruppo, numero feature, lato e priorità
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_GRP, m_BTLFeatureM.nSelGRP)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRC, m_BTLFeatureM.nPRC)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_SIDE, m_BTLFeatureM.nSelSIDE)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRIORITY, m_BTLFeatureM.nPriority)
|
||||
Dim nDO As Integer = 1
|
||||
If EgtGetInfo(nFeatureId, BTL_FTR_DO, nDO) Then
|
||||
m_BTLFeatureM.bDO = (nDO <> 0)
|
||||
Else
|
||||
m_BTLFeatureM.bDO = True
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(bDO))
|
||||
' leggo des,prid e frame
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_DES, m_BTLFeatureM.sDES)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_PRID, m_BTLFeatureM.nPRID)
|
||||
EgtGetInfo(nFeatureId, BTL_FTR_FRAME, m_BTLFeatureM.frFRAME)
|
||||
|
||||
' aggiorno parametri della feature
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
@@ -19,21 +19,21 @@ Public Class BTLPartVM
|
||||
End Property
|
||||
Private m_BTLStructureM As BTLStructureM
|
||||
|
||||
Private m_IsSelected As Boolean
|
||||
Public Property IsSelected As Boolean
|
||||
Get
|
||||
Return m_IsSelected
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_IsSelected = value
|
||||
Map.refProjectVM.BTLStructureVM.UpdateSelBTLParts()
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetIsSelected(value As Boolean, Optional bByOptim As Boolean = False)
|
||||
m_IsSelected = value
|
||||
Map.refProjectVM.BTLStructureVM.UpdateSelBTLParts(False, bByOptim)
|
||||
NotifyPropertyChanged(NameOf(IsSelected))
|
||||
End Sub
|
||||
'Private m_IsSelected As Boolean
|
||||
'Public Property IsSelected As Boolean
|
||||
' Get
|
||||
' Return m_IsSelected
|
||||
' End Get
|
||||
' Set(value As Boolean)
|
||||
' m_IsSelected = value
|
||||
' Map.refProjectVM.BTLStructureVM.UpdateSelBTLParts()
|
||||
' End Set
|
||||
'End Property
|
||||
'Friend Sub SetIsSelected(value As Boolean, Optional bByOptim As Boolean = False)
|
||||
' m_IsSelected = value
|
||||
' Map.refProjectVM.BTLStructureVM.UpdateSelBTLParts(False, bByOptim)
|
||||
' NotifyPropertyChanged(NameOf(IsSelected))
|
||||
'End Sub
|
||||
|
||||
Public ReadOnly Property nPartId As Integer
|
||||
Get
|
||||
@@ -128,7 +128,7 @@ Public Class BTLPartVM
|
||||
If Not EgtBeamSetPartBox(dBtlL, dBtlH, dBtlW, False) Then Return False
|
||||
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(m_BTLPartM.nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(m_BTLPartM.nPartId)
|
||||
' ricalcolo tutte le feature contenute
|
||||
UpdateFeatures()
|
||||
' setto part da ricalcolare
|
||||
@@ -2094,7 +2094,7 @@ Public Class BTLPartVM
|
||||
' eseguo rotazione di 90 gradi
|
||||
If EgtRotate(nPartId, b3Solid.Center, vtAxes, 90, GDB_RT.GLOB) Then
|
||||
' imposto modificato per copie
|
||||
EgtDuploSetModified(nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(nPartId)
|
||||
End If
|
||||
' aggiorno visualizzazione dimensioni
|
||||
NotifyPropertyChanged(NameOf(sW))
|
||||
|
||||
@@ -137,40 +137,40 @@ Public Class BTLStructureVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub UpdateSelBTLParts(Optional bFromSelPart As Boolean = False, Optional bByOptim As Boolean = False)
|
||||
Dim nOldSelCount As Integer = m_SelBTLPartsCnt
|
||||
Dim nSelCount As Integer = BTLPartVMList.LongCount(Function(x) x.IsSelected)
|
||||
m_SelBTLPartsCnt = nSelCount
|
||||
If Not bByOptim AndAlso (nOldSelCount <> nSelCount AndAlso (nOldSelCount = 1 OrElse nSelCount = 1)) OrElse bFromSelPart Then
|
||||
'Map.refLeftPanelVM.PartShowAllChanged()
|
||||
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
|
||||
If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
|
||||
Map.refFeatureListManagerVM.FeatureSelectionChanged()
|
||||
'Map.refLeftPanelVM.FeatureSelectionChanged()
|
||||
Map.refCALCPanelVM.SetIsEnabledForSelPart()
|
||||
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
|
||||
End If
|
||||
If nSelCount = 1 Then
|
||||
If bByOptim Then
|
||||
m_SelBTLPart = BTLPartVMList.FirstOrDefault(Function(x) x.IsSelected)
|
||||
Else
|
||||
SelBTLPart = BTLPartVMList.FirstOrDefault(Function(x) x.IsSelected)
|
||||
End If
|
||||
Else
|
||||
If bByOptim Then
|
||||
m_SelBTLPart = Nothing
|
||||
Else
|
||||
SelBTLPart = Nothing
|
||||
' mostro in parte bassa dati BTL
|
||||
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.STRUCTURE_)
|
||||
' mostro pezzi selezionati
|
||||
Map.refProjectVM.BTLStructureVM.ShowAll(False, True)
|
||||
Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelBTLPart))
|
||||
End If
|
||||
End Sub
|
||||
'Friend Sub UpdateSelBTLParts(Optional bFromSelPart As Boolean = False, Optional bByOptim As Boolean = False)
|
||||
' Dim nOldSelCount As Integer = m_SelBTLPartsCnt
|
||||
' Dim nSelCount As Integer = BTLPartVMList.LongCount(Function(x) x.IsSelected)
|
||||
' m_SelBTLPartsCnt = nSelCount
|
||||
' If Not bByOptim AndAlso (nOldSelCount <> nSelCount AndAlso (nOldSelCount = 1 OrElse nSelCount = 1)) OrElse bFromSelPart Then
|
||||
' 'Map.refLeftPanelVM.PartShowAllChanged()
|
||||
' If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
|
||||
' If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
|
||||
' Map.refFeatureListManagerVM.FeatureSelectionChanged()
|
||||
' 'Map.refLeftPanelVM.FeatureSelectionChanged()
|
||||
' Map.refCALCPanelVM.SetIsEnabledForSelPart()
|
||||
' Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProjectVM.PartManager_Visibility))
|
||||
' End If
|
||||
' If nSelCount = 1 Then
|
||||
' If bByOptim Then
|
||||
' m_SelBTLPart = BTLPartVMList.FirstOrDefault(Function(x) x.IsSelected)
|
||||
' Else
|
||||
' SelBTLPart = BTLPartVMList.FirstOrDefault(Function(x) x.IsSelected)
|
||||
' End If
|
||||
' Else
|
||||
' If bByOptim Then
|
||||
' m_SelBTLPart = Nothing
|
||||
' Else
|
||||
' SelBTLPart = Nothing
|
||||
' ' mostro in parte bassa dati BTL
|
||||
' Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.STRUCTURE_)
|
||||
' ' mostro pezzi selezionati
|
||||
' Map.refProjectVM.BTLStructureVM.ShowAll(False, True)
|
||||
' Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
|
||||
' EgtZoom(ZM.ALL)
|
||||
' End If
|
||||
' NotifyPropertyChanged(NameOf(SelBTLPart))
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub SelBTLParts_CollectionChanged(sender As Object, e As NotifyCollectionChangedEventArgs)
|
||||
If m_bOnlySelectItem Then Return
|
||||
@@ -274,6 +274,10 @@ Public Class BTLStructureVM
|
||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
EgtZoom(ZM.ALL)
|
||||
ElseIf Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' deseleziono eventuale MachGroup selezionato
|
||||
If Not IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) Then
|
||||
Map.refMachGroupPanelVM.SelectedMachGroup = Nothing
|
||||
End If
|
||||
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.MACHGROUP Then
|
||||
' resetto gruppo di lavorazione corrente
|
||||
EgtResetCurrMachGroup()
|
||||
@@ -293,30 +297,30 @@ Public Class BTLStructureVM
|
||||
Dim bLoadingSideShow As Boolean = (nPROJTYPE = BWType.BEAM)
|
||||
Dim bLeftToRight As Boolean = Not (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
|
||||
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
|
||||
' deseleziono le feature
|
||||
If Not IsNothing(BtlPart.SelBTLFeatureVM) Then SelBTLPart.SelBTLFeatureVM = Nothing
|
||||
' seleziono la prima feature
|
||||
If Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SelBTLFeatureVM = BtlPart.BTLFeatureVMList(0)
|
||||
' aggiorno stato selezionato tutto
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
Dim bFound As Boolean = False
|
||||
For Each Part As PartVM In Machgroup.PartVMList
|
||||
If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
||||
Part.SetSearchFound()
|
||||
bFound = True
|
||||
Else
|
||||
Part.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
If bFound Then
|
||||
Machgroup.SetSearchFound()
|
||||
Else
|
||||
Machgroup.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
'' trovo ed evidenzio MachGroup e Duplo di questo pezzo
|
||||
'If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
' Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
' For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
' Dim bFound As Boolean = False
|
||||
' For Each Part As PartVM In Machgroup.PartVMList
|
||||
' If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
||||
' Part.SetSearchFound()
|
||||
' bFound = True
|
||||
' Else
|
||||
' Part.ResetSearchFound()
|
||||
' End If
|
||||
' Next
|
||||
' If bFound Then
|
||||
' Machgroup.SetSearchFound()
|
||||
' Else
|
||||
' Machgroup.ResetSearchFound()
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
@@ -337,22 +341,23 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
' disabilito eventuale feature selezionata
|
||||
If Not IsNothing(BtlPart.m_SelBTLFeatureVM) Then BtlPart.SelBTLFeatureVM = Nothing
|
||||
' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
Dim bFound As Boolean = False
|
||||
For Each Part As PartVM In Machgroup.PartVMList
|
||||
If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
||||
Part.ResetSearchFound()
|
||||
bFound = True
|
||||
End If
|
||||
Next
|
||||
If bFound Then
|
||||
Machgroup.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
'' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
'If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
' Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
' For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
' Dim bFound As Boolean = False
|
||||
' For Each Part As PartVM In Machgroup.PartVMList
|
||||
' Dim i = EgtDuploGetOriginal(Part.nPartId)
|
||||
' If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
||||
' Part.ResetSearchFound()
|
||||
' bFound = True
|
||||
' End If
|
||||
' Next
|
||||
' If bFound Then
|
||||
' Machgroup.ResetSearchFound()
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
EgtDraw()
|
||||
End Sub
|
||||
Private Sub HighlightBTLPart(BtlPart As BTLPartVM)
|
||||
@@ -371,6 +376,28 @@ Public Class BTLStructureVM
|
||||
nNextPartId = EgtGetNext(nNextPartId)
|
||||
End While
|
||||
End If
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
Dim bFound As Boolean = False
|
||||
For Each Part As PartVM In Machgroup.PartVMList
|
||||
If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
||||
Part.SetSearchFound()
|
||||
bFound = True
|
||||
Else
|
||||
Part.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
If bFound Then
|
||||
Machgroup.SetSearchFound()
|
||||
Else
|
||||
Machgroup.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
' seleziono pagina BottomPanel
|
||||
If Not IsNothing(Map.refBottomPanelVM) Then Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.NULL)
|
||||
EgtDraw()
|
||||
@@ -391,16 +418,33 @@ Public Class BTLStructureVM
|
||||
nNextPartId = EgtGetNext(nNextPartId)
|
||||
End While
|
||||
End If
|
||||
' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
Dim bFound As Boolean = False
|
||||
For Each Part As PartVM In Machgroup.PartVMList
|
||||
Dim i = EgtDuploGetOriginal(Part.nPartId)
|
||||
If EgtDuploGetOriginal(Part.nPartId) = BtlPart.nPartId Then
|
||||
Part.ResetSearchFound()
|
||||
bFound = True
|
||||
End If
|
||||
Next
|
||||
If bFound Then
|
||||
Machgroup.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' seleziono pagina BottomPanel
|
||||
'Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.NULL)
|
||||
If bDraw Then EgtDraw()
|
||||
End Sub
|
||||
|
||||
Friend ReadOnly Property SelBTLPartList As List(Of BTLPartVM)
|
||||
Get
|
||||
Return m_BTLPartVMList.Where(Function(x) x.IsSelected).ToList()
|
||||
End Get
|
||||
End Property
|
||||
'Friend ReadOnly Property SelBTLPartList As List(Of BTLPartVM)
|
||||
' Get
|
||||
' Return m_BTLPartVMList.Where(Function(x) x.IsSelected).ToList()
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Private m_SelBTLPart As BTLPartVM = Nothing
|
||||
Public Property SelBTLPart As BTLPartVM
|
||||
@@ -1202,7 +1246,8 @@ Public Class BTLStructureVM
|
||||
Dim nGeomPartId As Integer = EgtGetFirstPart()
|
||||
While nGeomPartId <> GDB_ID.NULL
|
||||
Dim CurrPart As BTLPartVM = BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nGeomPartId)
|
||||
If Not IsNothing(CurrPart) AndAlso (Not bOnlySelected OrElse (bOnlySelected AndAlso CurrPart.IsSelected)) Then
|
||||
' If Not IsNothing(CurrPart) AndAlso (Not bOnlySelected OrElse (bOnlySelected AndAlso CurrPart.IsSelected)) Then
|
||||
If Not IsNothing(CurrPart) AndAlso Not bOnlySelected Then
|
||||
Dim nMode As Integer
|
||||
EgtGetMode(CurrPart.nPartId, nMode)
|
||||
If nMode <> GDB_MD.STD Then
|
||||
@@ -1368,7 +1413,7 @@ Public Class BTLStructureVM
|
||||
bSearchTextOk = False
|
||||
End If
|
||||
Dim bResult As Boolean = bSectionOk AndAlso bGroupOk AndAlso bSubGroupOk AndAlso bSearchTextOk
|
||||
If Not bResult And CurrBTLPart.IsSelected Then CurrBTLPart.IsSelected = False
|
||||
' If Not bResult And CurrBTLPart.IsSelected Then CurrBTLPart.IsSelected = False
|
||||
Return bResult
|
||||
End Function
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ Public Class CALCPanelVM
|
||||
EgtGetCurrFilePath(sCurrFilePath)
|
||||
EgtOpenFile(sCurrFilePath)
|
||||
' imposto duplo modificato
|
||||
EgtDuploSetModified(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
' riseleziono il pezzo precedentemente selezionato
|
||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Map.refProjectVM.BTLStructureVM.SelBTLPart)
|
||||
Map.refMyStatusBarVM.SetOutputMessage("Modified file reloaded", 1)
|
||||
@@ -906,11 +906,11 @@ Public Class CALCPanelVM
|
||||
End If
|
||||
Next
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.SelBTLPartsCnt > 1 Then
|
||||
For Each SelPart In Map.refProjectVM.BTLStructureVM.SelBTLPartList
|
||||
If Not IsNothing(SelPart) AndAlso SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
SelPart.ResetCalcTotalPart()
|
||||
End If
|
||||
Next
|
||||
'For Each SelPart In Map.refProjectVM.BTLStructureVM.SelBTLPartList
|
||||
' If Not IsNothing(SelPart) AndAlso SelPart.nGlobalState <> CalcStates.NOTCALCULATED Then
|
||||
' SelPart.ResetCalcTotalPart()
|
||||
' End If
|
||||
'Next
|
||||
Else
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLPart
|
||||
If IsNothing(SelPart) Then Return
|
||||
|
||||
@@ -150,7 +150,7 @@ Public Class FeatureListManagerVM
|
||||
Dim NewFeature = SelFeature.Copy()
|
||||
If Not IsNothing(NewFeature) Then
|
||||
SelPart.SelBTLFeatureVM = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.FirstOrDefault(Function(x) x.BTLFeatureM Is NewFeature)
|
||||
EgtDuploSetModified(SelPart.nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(SelPart.nPartId)
|
||||
End If
|
||||
SelPart.ResetCalcPart()
|
||||
End Sub
|
||||
@@ -250,7 +250,7 @@ Public Class FeatureListManagerVM
|
||||
End If
|
||||
' se è stata creata
|
||||
If nNewFeatureId <> GDB_ID.NULL Then
|
||||
EgtDuploSetModified(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
' la aggiungo a struttura BTL corrente
|
||||
NewFeat = BTLFeatureM.CreateBTLFeature(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM, nNewFeatureId)
|
||||
If Not bMacroFlag Then NewFeat.SetDefaultValues()
|
||||
@@ -285,7 +285,7 @@ Public Class FeatureListManagerVM
|
||||
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then Return
|
||||
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then Return
|
||||
If EgtBeamEraseProcess(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.nFeatureId) Then
|
||||
EgtDuploSetModified(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
MyMachGroupPanelM.SetDuploModified(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId)
|
||||
' rimuovo dalla lista feature
|
||||
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLFeatureVMList.IndexOf(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM)
|
||||
If Index = 0 Then
|
||||
|
||||
@@ -17,6 +17,28 @@ Public Class MyMachGroupPanelVM
|
||||
Set(value As MyMachGroupVM)
|
||||
' deevidenzio BTLPart di questo pezzo
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count = 1 Then
|
||||
' se pezzo evidenziato da selezione precedente
|
||||
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST Then
|
||||
Dim nSelBTLPartId As Integer = Map.refProjectVM.BTLStructureVM.SelBTLParts(0).nPartId
|
||||
' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
Dim bFound As Boolean = False
|
||||
For Each Part As PartVM In Machgroup.PartVMList
|
||||
If EgtDuploGetOriginal(Part.nPartId) = nSelBTLPartId Then
|
||||
Part.ResetSearchFound()
|
||||
bFound = True
|
||||
End If
|
||||
Next
|
||||
If bFound Then
|
||||
Machgroup.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If Not IsNothing(SelectedMachGroup) AndAlso Not IsNothing(SelectedMachGroup.SelPart) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
Dim nDuploOriginalId As Integer = 0
|
||||
@@ -31,6 +53,18 @@ Public Class MyMachGroupPanelVM
|
||||
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
' se precedente pezzo selezionato
|
||||
If Not IsNothing(value) AndAlso Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then
|
||||
Dim SelBTLPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLParts(0)
|
||||
' deseleziono pezzo in lista BTLPart
|
||||
For BTLPartIndex = Map.refProjectVM.BTLStructureVM.SelBTLParts.Count - 1 To 0 Step -1
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLParts.RemoveFromList(Map.refProjectVM.BTLStructureVM.SelBTLParts(BTLPartIndex))
|
||||
Next
|
||||
' e lo evidenzio
|
||||
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.HIGHLIGHT)
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLParts.Add(SelBTLPart)
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then
|
||||
@@ -45,7 +79,7 @@ Public Class MyMachGroupPanelVM
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(SelectedMachGroup))
|
||||
' imposto tipo di grid selezionata
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP)
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Not IsNothing(value) Then Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
@@ -23,6 +23,26 @@ Public Class MyMachGroupVM
|
||||
End Get
|
||||
Set(value As Core.PartVM)
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' se pezzo evidenziato da ultima selezione precedente
|
||||
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PARTLIST AndAlso Map.refProjectVM.BTLStructureVM.SelBTLParts.Count = 1 Then
|
||||
Dim nSelBTLPartId As Integer = Map.refProjectVM.BTLStructureVM.SelBTLParts(0).nPartId
|
||||
' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
|
||||
Dim bFound As Boolean = False
|
||||
For Each Part As PartVM In Machgroup.PartVMList
|
||||
If EgtDuploGetOriginal(Part.nPartId) = nSelBTLPartId Then
|
||||
Part.ResetSearchFound()
|
||||
bFound = True
|
||||
End If
|
||||
Next
|
||||
If bFound Then
|
||||
Machgroup.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
If Not IsNothing(m_SelPart) Then
|
||||
' deevidenzio BTLPart di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
|
||||
@@ -40,6 +60,12 @@ Public Class MyMachGroupVM
|
||||
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 Then
|
||||
' deseleziono pezzo in lista BTLPart
|
||||
For BTLPartIndex = Map.refProjectVM.BTLStructureVM.SelBTLParts.Count - 1 To 0 Step -1
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLParts.Remove(Map.refProjectVM.BTLStructureVM.SelBTLParts(BTLPartIndex))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
m_SelPart = value
|
||||
' seleziono pezzo
|
||||
@@ -48,8 +74,6 @@ Public Class MyMachGroupVM
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' imposto modalita' prod su vista feature
|
||||
Map.refProjectVM.SelProdProj = ProdProj.PROD
|
||||
' deseleziono pezzo in lista BTLPart
|
||||
Map.refProjectVM.BTLStructureVM.SelBTLParts.Clear()
|
||||
End If
|
||||
EgtSelectObj(SelPart.nPartId)
|
||||
If Map.refMainMenuVM.SelPage = Pages.MACHINING Then
|
||||
@@ -824,6 +848,12 @@ Public Class MyMachGroupVM
|
||||
EgtSetCurrMachGroup(nCurrMachGroupId)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub RefreshMachGroup()
|
||||
For Each Part In PartVMList
|
||||
Part.RefreshPart()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' Machgroup
|
||||
|
||||
#Region "Parts"
|
||||
|
||||
@@ -520,6 +520,61 @@ Public Class PartVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub RefreshPart()
|
||||
' aggiorno dati del pezzo
|
||||
EgtGetInfo(nPartId, BTL_PRT_PROJ, nProjId)
|
||||
EgtGetInfo(nPartId, BTL_PRT_PDN, nPDN)
|
||||
EgtGetInfo(nPartId, BTL_PRT_NAM, sNAM)
|
||||
EgtGetInfo(nPartId, BTL_PRT_L, dL)
|
||||
EgtGetInfo(nPartId, BTL_PRT_W, dW)
|
||||
EgtGetInfo(nPartId, BTL_PRT_H, dH)
|
||||
EgtGetInfo(nPartId, BTL_PRT_CNT, nCNT)
|
||||
EgtGetInfo(nPartId, BTL_PRT_GROUP, sGROUP)
|
||||
EgtGetInfo(nPartId, BTL_PRT_STOREY, sSTOREY)
|
||||
EgtGetInfo(nPartId, BTL_PRT_MATERIAL, sMATERIAL)
|
||||
If nType = BWType.BEAM Then
|
||||
'' leggo PosX
|
||||
'Dim sInfo As String = ""
|
||||
'Dim Index = 1
|
||||
'Dim sSplitInfo() As String = Nothing
|
||||
'Dim bFound As Boolean = False
|
||||
'While EgtGetInfo(m_ParentMachGroup.Id, MGR_RPT_PART & Index, sInfo)
|
||||
' If Not String.IsNullOrWhiteSpace(sInfo) Then
|
||||
' sSplitInfo = sInfo.Split(","c)
|
||||
' If sSplitInfo(0) = nPartId Then
|
||||
' bFound = True
|
||||
' Exit While
|
||||
' End If
|
||||
' End If
|
||||
' Index += 1
|
||||
'End While
|
||||
'If bFound Then
|
||||
' StringToDoubleAdv(sSplitInfo(1), dPOSX)
|
||||
'End If
|
||||
Else
|
||||
' leggo PosX, PosY, Rot e Flip
|
||||
EgtGetInfo(nPartId, MGR_PRT_POSX, dPOSX)
|
||||
EgtGetInfo(nPartId, MGR_PRT_POSY, dPOSY)
|
||||
EgtGetInfo(nPartId, MGR_PRT_ROT, dROT)
|
||||
EgtGetInfo(nPartId, MGR_PRT_FLIP, nFLIP)
|
||||
End If
|
||||
' leggo volume
|
||||
If Not EgtGetInfo(nPartId, BTL_PRT_VOLUME, dVolume) Then
|
||||
Dim nOrigId As Integer = EgtDuploGetOriginal(nPartId)
|
||||
EgtGetInfo(nOrigId, BTL_PRT_VOLUME, dVolume)
|
||||
End If
|
||||
' leggo feature
|
||||
PartM.RefreshBTLFeatures()
|
||||
FeatureVMList.Clear()
|
||||
CreateBTLFeatureVMList()
|
||||
|
||||
'aggiorno le sue feature
|
||||
' PartM.LoadBTLFeatures(PartM, PartM.nPartId)
|
||||
'For Each Feature In FeatureVMList
|
||||
' Feature.RefreshFeature()
|
||||
'Next
|
||||
End Sub
|
||||
|
||||
#End Region ' Part
|
||||
|
||||
#Region "Feature"
|
||||
|
||||
@@ -300,6 +300,8 @@ Public Class MainWindowM
|
||||
EgtLuaRequire(sLuaBaseLib)
|
||||
' Recupero flag OnlyProd
|
||||
m_bOnlyProd = GetMainPrivateProfileInt(S_GENERAL, K_ONLYPROD, 0) = 1
|
||||
' e lo imposto nel core
|
||||
Core.Configuration.SetOnlyProd(m_bOnlyProd)
|
||||
' Info su opzioni chiave
|
||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString())
|
||||
End Sub
|
||||
|
||||
@@ -957,7 +957,7 @@ Public Class OnlyProdManagerVM
|
||||
If nSelPartId <> GDB_ID.NULL Then
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
' SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
@@ -1074,7 +1074,7 @@ Public Class OnlyProdManagerVM
|
||||
If nSelPartId <> GDB_ID.NULL Then
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
'SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
@@ -1189,7 +1189,7 @@ Public Class OnlyProdManagerVM
|
||||
If nSelPartId <> GDB_ID.NULL Then
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
'SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
@@ -1398,7 +1398,7 @@ Public Class OnlyProdManagerVM
|
||||
If nSelPartId <> GDB_ID.NULL Then
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
'SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -891,7 +891,7 @@ Public Class ProjManagerVM
|
||||
If nSelPartId <> GDB_ID.NULL Then
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
' SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
@@ -1008,7 +1008,7 @@ Public Class ProjManagerVM
|
||||
If nSelPartId <> GDB_ID.NULL Then
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
'SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
@@ -1123,7 +1123,7 @@ Public Class ProjManagerVM
|
||||
If nSelPartId <> GDB_ID.NULL Then
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
'SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
@@ -1330,7 +1330,7 @@ Public Class ProjManagerVM
|
||||
If nSelPartId <> GDB_ID.NULL Then
|
||||
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPartId = nSelPartId)
|
||||
If Not IsNothing(SelPart) Then
|
||||
SelPart.IsSelected = True
|
||||
'SelPart.IsSelected = True
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, True, False)
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user