- ottimizzazione codice
- aggiunta pulsante progettazione in Supervisor
This commit is contained in:
@@ -6,12 +6,18 @@
|
||||
|
||||
<!--Barra superiore dei comandi-->
|
||||
<UniformGrid Rows="1">
|
||||
<Button Content="{Binding OnlyProdPage_Msg}"
|
||||
Command="{Binding OnlyProdPage_Command}"
|
||||
Visibility="{Binding OnlyProdPage_Visibility}"
|
||||
Style="{StaticResource MainMenu_Button}"/>
|
||||
<Button Content="{Binding Viewer_Msg}"
|
||||
Command="{Binding Viewer_Command}"
|
||||
Style="{StaticResource MainMenu_Button}"/>
|
||||
Command="{Binding Viewer_Command}"
|
||||
Visibility="{Binding ViewerOptimizer_Visibility}"
|
||||
Style="{StaticResource MainMenu_Button}"/>
|
||||
<Button Content="{Binding Optimizer_Msg}"
|
||||
Command="{Binding Optimizer_Command}"
|
||||
Style="{StaticResource MainMenu_Button}"/>
|
||||
Command="{Binding Optimizer_Command}"
|
||||
Visibility="{Binding ViewerOptimizer_Visibility}"
|
||||
Style="{StaticResource MainMenu_Button}"/>
|
||||
<RadioButton Content="{Binding Supervisor_Msg}"
|
||||
IsChecked="{Binding Supervisor_IsChecked}"
|
||||
Style="{StaticResource MainMenu_ToggleButton}"/>
|
||||
|
||||
@@ -67,6 +67,18 @@ Public Class MainMenuVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OnlyProdPage_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ViewerOptimizer_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE, Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_SelPage As Integer = -1
|
||||
Public Property SelPage As Integer
|
||||
Get
|
||||
@@ -156,11 +168,18 @@ Public Class MainMenuVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property OnlyProdPage_Msg As String
|
||||
Get
|
||||
Return EgtMsg(61896)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdViewer As ICommand
|
||||
Private m_cmdOptimizer As ICommand
|
||||
Private m_cmdOnlyProdPage As ICommand
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
@@ -375,7 +394,41 @@ Public Class MainMenuVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Optimizer
|
||||
#End Region ' OnlyProdPage
|
||||
|
||||
#Region "OnlyProdPage"
|
||||
|
||||
Public ReadOnly Property OnlyProdPage_Command As ICommand
|
||||
Get
|
||||
If m_cmdOnlyProdPage Is Nothing Then
|
||||
m_cmdOnlyProdPage = New Command(AddressOf OnlyProdPage)
|
||||
End If
|
||||
Return m_cmdOnlyProdPage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub OnlyProdPage()
|
||||
Dim sViewerOptimizerName As String = "EgtBEAMWALL.ViewerOptimizerR32"
|
||||
' recupero processo del supervisore
|
||||
Dim localProc As Process() = Process.GetProcessesByName(sViewerOptimizerName)
|
||||
If localProc.Length > 0 Then
|
||||
For Each p As Process In localProc
|
||||
' porto in primo piano il ViewerOptimizer
|
||||
BringWindowToFront(p.MainWindowHandle)
|
||||
DbControllers.m_StatusMapController.UpdateAction(DbControllers.m_SupervisorId, Map.refSupervisorManagerVM.CurrProd.nProdId, -Pages.ONLYPRODPAGE, StatusMapItemType.Comm, StatusMapOpType.OpenPageInViewOptimRequest, "")
|
||||
Exit For
|
||||
Next
|
||||
Else
|
||||
Dim sViewerOptimizerPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sViewerOptimizerName & ".exe"
|
||||
Try
|
||||
Process.Start(sViewerOptimizerPath, "2 " & Pages.ONLYPRODPAGE)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error: impossible starting vieweroptimizer from path " & sViewerOptimizerPath)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' OnlyProdPage
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
|
||||
@@ -95,7 +95,9 @@ Public Class SupervisorManagerVM
|
||||
|
||||
|
||||
#End Region ' ToolTip
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
|
||||
@@ -1083,10 +1083,11 @@ Public Class BTLPartManagerVM
|
||||
End If
|
||||
' se modalita' assemblato
|
||||
Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' devo smontarlo prima di ruotare le travi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
Configuration.AssembledMode(bShowBuilding)
|
||||
'If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' devo smontarlo prima di ruotare le travi
|
||||
' Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
'End If
|
||||
' inverto i pezzi selezionati
|
||||
For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts
|
||||
Part.Invert()
|
||||
@@ -1124,10 +1125,11 @@ Public Class BTLPartManagerVM
|
||||
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
|
||||
' se modalita' assemblato
|
||||
Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' devo smontarlo prima di ruotare le travi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
Configuration.AssembledMode(bShowBuilding)
|
||||
'If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' devo smontarlo prima di ruotare le travi
|
||||
' Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
'End If
|
||||
' ruoto i pezzi selezionati
|
||||
For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts
|
||||
Part.BackRotation(False, False)
|
||||
@@ -1172,10 +1174,11 @@ Public Class BTLPartManagerVM
|
||||
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
|
||||
' se modalita' assemblato
|
||||
Dim bShowBuilding As Boolean = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' devo smontarlo prima di ruotare le travi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
Configuration.AssembledMode(bShowBuilding)
|
||||
'If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' devo smontarlo prima di ruotare le travi
|
||||
' Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
'End If
|
||||
' ruoto i pezzi selezionati
|
||||
For Each Part In Map.refProjectVM.BTLStructureVM.SelBTLParts
|
||||
Part.ForwardRotation(False, False)
|
||||
|
||||
@@ -119,8 +119,9 @@ Public Class BTLStructureVM
|
||||
End Select
|
||||
' aggiornamento grafica
|
||||
'Map.refLeftPanelVM.PartShowAllChanged()
|
||||
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
|
||||
If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
|
||||
Configuration.UpdateGraphics()
|
||||
'If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
|
||||
'If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
|
||||
'Map.refLeftPanelVM.FeatureSelectionChanged()
|
||||
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
|
||||
Map.refCALCPanelVM.SetIsEnabledForSelPart()
|
||||
@@ -215,28 +216,30 @@ Public Class BTLStructureVM
|
||||
End Select
|
||||
' aggiornamento grafica
|
||||
'Map.refLeftPanelVM.PartShowAllChanged()
|
||||
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
|
||||
If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
|
||||
Configuration.UpdateGraphics()
|
||||
'If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
|
||||
'If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
|
||||
End Sub
|
||||
|
||||
Private Sub SelectBTLPart(BtlPart As BTLPartVM)
|
||||
m_SelBTLPart = BtlPart
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
EgtBeamShowFacesName(False)
|
||||
EgtBeamShowLoadingSide(False, False)
|
||||
Map.refProjectVM.MacroFeature_IsEnabled = True
|
||||
' se modalità building, la tolgo
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
ShowBuilding(False, False)
|
||||
End If
|
||||
' seleziono pezzo nella scena
|
||||
SceneSelPartSelection()
|
||||
' seleziono pezzo in Db geometrico
|
||||
EgtBeamSetPart(BtlPart.nPartId)
|
||||
EgtBeamShowFacesName(True)
|
||||
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)
|
||||
Configuration.SelectedPieces(BtlPart.nPartId, Me)
|
||||
'EgtBeamShowFacesName(False)
|
||||
'EgtBeamShowLoadingSide(False, False)
|
||||
'Map.refProjectVM.MacroFeature_IsEnabled = True
|
||||
'' se modalità building, la tolgo
|
||||
'If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
' ShowBuilding(False, False)
|
||||
'End If
|
||||
'' seleziono pezzo nella scena
|
||||
'SceneSelPartSelection()
|
||||
'' seleziono pezzo in Db geometrico
|
||||
'EgtBeamSetPart(BtlPart.nPartId)
|
||||
'EgtBeamShowFacesName(True)
|
||||
'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)
|
||||
' seleziono pagina BottomPanel
|
||||
If Not IsNothing(Map.refBottomPanelVM) Then
|
||||
Map.refBottomPanelVM.SetSelPartFeatureTab(BottomPanelVM.PartFeatureTab.PART)
|
||||
@@ -255,25 +258,26 @@ Public Class BTLStructureVM
|
||||
EgtBeamShowFacesName(False)
|
||||
EgtBeamShowLoadingSide(False, 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
|
||||
Configuration.SetSearchPiece(BtlPart.nPartId)
|
||||
'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
|
||||
' seleziono pezzo nella scena
|
||||
SceneSelPartSelection()
|
||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
@@ -287,21 +291,22 @@ Public Class BTLStructureVM
|
||||
' resetto gruppo di lavorazione corrente
|
||||
EgtResetCurrMachGroup()
|
||||
End If
|
||||
EgtBeamShowFacesName(False)
|
||||
EgtBeamShowLoadingSide(False, False)
|
||||
Map.refProjectVM.MacroFeature_IsEnabled = True
|
||||
' se modalità building, la tolgo
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
ShowBuilding(False, False)
|
||||
End If
|
||||
' seleziono pezzo nella scena
|
||||
SceneSelPartSelection()
|
||||
' seleziono pezzo in Db geometrico
|
||||
EgtBeamSetPart(BtlPart.nPartId)
|
||||
EgtBeamShowFacesName(True)
|
||||
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)
|
||||
Configuration.SelectedPieces(BtlPart.nPartId, Me)
|
||||
'EgtBeamShowFacesName(False)
|
||||
'EgtBeamShowLoadingSide(False, False)
|
||||
'Map.refProjectVM.MacroFeature_IsEnabled = True
|
||||
'' se modalità building, la tolgo
|
||||
'If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
' ShowBuilding(False, False)
|
||||
'End If
|
||||
'' seleziono pezzo nella scena
|
||||
'SceneSelPartSelection()
|
||||
'' seleziono pezzo in Db geometrico
|
||||
'EgtBeamSetPart(BtlPart.nPartId)
|
||||
'EgtBeamShowFacesName(True)
|
||||
'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)
|
||||
' seleziono la prima feature
|
||||
If Not IsNothing(BtlPart.BTLFeatureVMList) AndAlso BtlPart.BTLFeatureVMList.Count > 0 Then SelBTLPart.SelBTLFeatureVM = BtlPart.BTLFeatureVMList(0)
|
||||
' aggiorno stato selezionato tutto
|
||||
@@ -333,11 +338,12 @@ Public Class BTLStructureVM
|
||||
End Sub
|
||||
Private Sub DeselectBTLPart(BtlPart As BTLPartVM)
|
||||
' se necessario tolgo solido dal precedentemente selezionato
|
||||
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
' tolgo eventuale indicazione solido rimasta da pezzo precedente
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
Map.refProjectVM.BTLStructureVM.ShowSolid(BtlPart.nPartId, False, False)
|
||||
End If
|
||||
Configuration.DeselectSolid(BtlPart.nPartId, True)
|
||||
'If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
' ' tolgo eventuale indicazione solido rimasta da pezzo precedente
|
||||
' Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
' Map.refProjectVM.BTLStructureVM.ShowSolid(BtlPart.nPartId, False, False)
|
||||
'End If
|
||||
If m_SelBTLPart Is BtlPart Then
|
||||
EgtBeamShowFacesName(False)
|
||||
EgtBeamShowLoadingSide(False, False)
|
||||
@@ -383,25 +389,26 @@ Public Class BTLStructureVM
|
||||
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
|
||||
Configuration.SetSearchPiece(BtlPart.nPartId)
|
||||
'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)
|
||||
@@ -424,22 +431,23 @@ Public Class BTLStructureVM
|
||||
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
|
||||
Configuration.ResetSearchPiece(BtlPart.nPartId)
|
||||
'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()
|
||||
@@ -464,9 +472,10 @@ Public Class BTLStructureVM
|
||||
End If
|
||||
If Not IsNothing(m_SelBTLPart) Then
|
||||
' se necessario tolgo solido dal precedentemente selezionato
|
||||
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
End If
|
||||
Configuration.DeselectSolid()
|
||||
'If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
' Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
'End If
|
||||
' disabilito eventuale feature selezionata
|
||||
If Not IsNothing(m_SelBTLPart.m_SelBTLFeatureVM) Then m_SelBTLPart.SelBTLFeatureVM = Nothing
|
||||
End If
|
||||
@@ -495,25 +504,26 @@ Public Class BTLStructureVM
|
||||
EgtZoom(ZM.ALL)
|
||||
ElseIf Map.refMainMenuVM.SelPage = Pages.MACHINING 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) = m_SelBTLPart.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
|
||||
Configuration.SetSearchPiece(m_SelBTLPart.nPartId)
|
||||
'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) = m_SelBTLPart.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
|
||||
' seleziono pezzo nella scena
|
||||
SceneSelPartSelection()
|
||||
Core.ViewPanelVM.BWSetView(If(Core.ViewPanelVM.Type = BWType.BEAM, VT.ISO_SW, VT.TOP), False)
|
||||
@@ -537,25 +547,26 @@ Public Class BTLStructureVM
|
||||
' 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) = m_SelBTLPart.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
|
||||
Configuration.ResetSearchPiece(m_SelBTLPart.nPartId)
|
||||
'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) = m_SelBTLPart.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
|
||||
@@ -1215,7 +1226,7 @@ Public Class BTLStructureVM
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub SceneSelPartSelection()
|
||||
Friend Sub SceneSelPartSelection()
|
||||
' deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' disabilito impostazione modificato
|
||||
@@ -1238,9 +1249,10 @@ Public Class BTLStructureVM
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
If Not IsNothing(SelBTLPart) Then
|
||||
' se pezzo solido, lo riporto normale
|
||||
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
End If
|
||||
Configuration.DeselectSolid()
|
||||
'If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
' Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
'End If
|
||||
' tolgo pezzo selezionato
|
||||
SelBTLPart.SelBTLFeatureVM = Nothing
|
||||
End If
|
||||
@@ -1278,10 +1290,11 @@ Public Class BTLStructureVM
|
||||
Dim DisableMgr As New DisableModifiedMgr
|
||||
If Not IsNothing(SelBTLPart) Then
|
||||
' se pezzo solido, lo riporto normale
|
||||
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
ShowSolid(GDB_ID.NULL, False, False)
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
End If
|
||||
Configuration.DeselectSolid(GDB_ID.NULL, True)
|
||||
'If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
' ShowSolid(GDB_ID.NULL, False, False)
|
||||
' Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
'End If
|
||||
' tolgo pezzo selezionato
|
||||
SelBTLPart.SelBTLFeatureVM = Nothing
|
||||
End If
|
||||
|
||||
@@ -783,10 +783,11 @@ Public Class CALCPanelVM
|
||||
(Map.refMainMenuVM.SelPage = Pages.MACHINING AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) OrElse
|
||||
(Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso (IsNothing(ProjectManagerVM.CurrProj) OrElse IsNothing(Map.refProjectVM.BTLStructureVM)) AndAlso (IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
|
||||
' se modalita' assemblato
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
Configuration.AssembledMode(Map.refShowBeamPanelVM.ShowBuilding_IsChecked)
|
||||
'If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
|
||||
' Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
'End If
|
||||
Dim BarList() As EgtBEAMWALL.Core.Bar = Nothing
|
||||
Dim ProjType As BWType
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
|
||||
@@ -429,6 +429,7 @@
|
||||
<Compile Include="UpdateBTLWnd\UpdateOrAppendWndV.xaml.vb">
|
||||
<DependentUpon>UpdateOrAppendWndV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Utility\Configuration.vb" />
|
||||
<Compile Include="Utility\DbControllers.vb" />
|
||||
<Compile Include="Utility\DisableModifiedMgr.vb" />
|
||||
<Compile Include="Utility\LuaExec.vb" />
|
||||
|
||||
@@ -442,6 +442,7 @@ Public Class FreeContourManagerVM
|
||||
Map.refProjectVM.NotifyPropertyChanged(NameOf(Map.refProdProjManagerVM.PartManager_Visibility))
|
||||
' attivo pannello
|
||||
Map.refProjectVM.SetFreeContourManager_Visibility(True)
|
||||
Map.refProjWndVM.SetFreeContourManager_Visibility(True)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
@@ -530,6 +531,7 @@ Public Class FreeContourManagerVM
|
||||
End If
|
||||
' disattivo pannello
|
||||
Map.refProjectVM.SetFreeContourManager_Visibility(False)
|
||||
Map.refProjWndVM.SetFreeContourManager_Visibility(False)
|
||||
' attivo bottone edit
|
||||
SelFeature.RefreshFCMBtnVisibility()
|
||||
' resetto tutte le variabili correnti
|
||||
|
||||
@@ -48,7 +48,7 @@ Public Class BTLPartListV
|
||||
ElseIf e.ChangedButton = m_HighlightBtn Then
|
||||
Map.refProjectVM.BTLStructureVM.SetSelectionType(BTLStructureVM.SelectionTypes.HIGHLIGHT)
|
||||
'Map.refProjectVM.SelProdProj = ProdProj.NULL
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProdProjManagerVM.SelProdProj = ProdProj.NULL
|
||||
'If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProdProjManagerVM.SelProdProj = ProdProj.NULL
|
||||
End If
|
||||
' imposto tipo di grid selezionata
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.PARTLIST)
|
||||
|
||||
@@ -18,45 +18,47 @@ Public Class MyMachGroupPanelVM
|
||||
' deevidenzio BTLPart di questo pezzo
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' mostro pezzi selezionati
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
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
|
||||
Configuration.ResetSearchPiece(nSelBTLPartId)
|
||||
'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
|
||||
If EgtGetInfo(SelectedMachGroup.SelPart.nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Configuration.ResetSearch(SelectedMachGroup.SelPart.nPartId)
|
||||
'For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
' Dim nDuploOriginalId As Integer = 0
|
||||
' If EgtGetInfo(SelectedMachGroup.SelPart.nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
' Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
End If
|
||||
' se modalita' assemblato
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
Configuration.AssembledMode(Map.refShowBeamPanelVM.ShowBuilding_IsChecked)
|
||||
'If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' 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
|
||||
If Not IsNothing(value) AndAlso Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART AndAlso Map.refProjectVM.BTLStructureVM.SelBTLParts.Count > 0 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
|
||||
@@ -73,10 +75,12 @@ Public Class MyMachGroupPanelVM
|
||||
End If
|
||||
End If
|
||||
|
||||
If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then
|
||||
EgtBeamShowFacesName(False)
|
||||
EgtBeamShowLoadingSide(False, False)
|
||||
End If
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
|
||||
'If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then
|
||||
' EgtBeamShowFacesName(False)
|
||||
' EgtBeamShowLoadingSide(False, False)
|
||||
'End If
|
||||
m_SelectedMachGroup = value
|
||||
If Not IsNothing(value) Then
|
||||
OnPreSetCurrMachGroup()
|
||||
|
||||
@@ -23,43 +23,48 @@ Public Class MyMachGroupVM
|
||||
End Get
|
||||
Set(value As Core.PartVM)
|
||||
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
' mostro pezzi selezionati
|
||||
Map.refShowBeamPanelVM.bShowAll = False
|
||||
' 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
|
||||
Configuration.ResetSearchPiece(nSelBTLPartId)
|
||||
'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
|
||||
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
Dim nDuploOriginalId As Integer = 0
|
||||
If EgtGetInfo(m_SelPart.nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Configuration.ResetSearch(m_SelPart.nPartId)
|
||||
'For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
' Dim nDuploOriginalId As Integer = 0
|
||||
' If EgtGetInfo(m_SelPart.nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
' Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
End If
|
||||
End If
|
||||
' se modalita' assemblato
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
Configuration.AssembledMode(Map.refShowBeamPanelVM.ShowBuilding_IsChecked)
|
||||
'If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' 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
|
||||
@@ -84,14 +89,15 @@ Public Class MyMachGroupVM
|
||||
End If
|
||||
' trovo ed evidenzio BTLPart di questo pezzo
|
||||
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
|
||||
Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
Dim nDuploOriginalId As Integer = 0
|
||||
If EgtGetInfo(m_SelPart.nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).SetSearchFound()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
'Dim MachGroupList As New List(Of MyMachGroupVM)
|
||||
Configuration.SetSearch(m_SelPart.nPartId)
|
||||
'For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
' Dim nDuploOriginalId As Integer = 0
|
||||
' If EgtGetInfo(m_SelPart.nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
' Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).SetSearchFound()
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -143,14 +149,15 @@ Public Class MyMachGroupVM
|
||||
If m_PartVMList.Count > 0 Then
|
||||
' verifico se la dimensione e' maggiore del box minimo dei pezzi
|
||||
Dim b3Parts As New BBox3d
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(m_PartVMList(0).nPartId, "Box")
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Parts)
|
||||
For PartIndex = 1 To m_PartVMList.Count - 1
|
||||
Dim b3Part As New BBox3d
|
||||
nBoxLayerId = EgtGetFirstNameInGroup(m_PartVMList(PartIndex).nPartId, "Box")
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Part)
|
||||
b3Parts.Add(b3Part)
|
||||
Next
|
||||
Configuration.VerifyMaxDimension(m_PartVMList, b3Parts)
|
||||
'Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(m_PartVMList(0).nPartId, "Box")
|
||||
'EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Parts)
|
||||
'For PartIndex = 1 To m_PartVMList.Count - 1
|
||||
' Dim b3Part As New BBox3d
|
||||
' nBoxLayerId = EgtGetFirstNameInGroup(m_PartVMList(PartIndex).nPartId, "Box")
|
||||
' EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Part)
|
||||
' b3Parts.Add(b3Part)
|
||||
'Next
|
||||
Dim b3RawPart As New BBox3d
|
||||
EgtGetRawPartBBox(nRawPartId, b3RawPart)
|
||||
Dim dMinValue As Double = 0
|
||||
@@ -167,19 +174,20 @@ Public Class MyMachGroupVM
|
||||
If EgtModifyRawPartSize(nRawPartId, dValue, MyMachGroupM.dW, MyMachGroupM.dH) Then
|
||||
' riporto il grezzo nell'angolo tavola di origine
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim p3OrigOnTab As Point3d
|
||||
Select Case CurrentMachine.OrigCorner
|
||||
Case MCH_CR.BL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.BR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
End Select
|
||||
EgtMoveToCornerRawPart(nRawPartId, p3OrigOnTab, CurrentMachine.OrigCorner)
|
||||
Configuration.SelectCorner(b3Tab, nRawPartId)
|
||||
'EgtGetTableArea(1, b3Tab)
|
||||
'Dim p3OrigOnTab As Point3d
|
||||
'Select Case CurrentMachine.OrigCorner
|
||||
' Case MCH_CR.BL
|
||||
' p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
' Case MCH_CR.BR
|
||||
' p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
' Case MCH_CR.TL
|
||||
' p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
' Case MCH_CR.TR
|
||||
' p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
'End Select
|
||||
'EgtMoveToCornerRawPart(nRawPartId, p3OrigOnTab, CurrentMachine.OrigCorner)
|
||||
' sposto tutti i pezzi di quanto si e' accorciato il grezzo
|
||||
If CurrentMachine.NestingCorner = MCH_CR.TR OrElse CurrentMachine.NestingCorner = MCH_CR.BR Then
|
||||
For Each Part In m_PartVMList
|
||||
@@ -214,14 +222,15 @@ Public Class MyMachGroupVM
|
||||
If m_PartVMList.Count > 0 Then
|
||||
' verifico se la dimensione e' maggiore del box minimo dei pezzi
|
||||
Dim b3Parts As New BBox3d
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(m_PartVMList(0).nPartId, "Box")
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Parts)
|
||||
For PartIndex = 1 To m_PartVMList.Count - 1
|
||||
Dim b3Part As New BBox3d
|
||||
nBoxLayerId = EgtGetFirstNameInGroup(m_PartVMList(PartIndex).nPartId, "Box")
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Part)
|
||||
b3Parts.Add(b3Part)
|
||||
Next
|
||||
Configuration.VerifyMaxDimension(m_PartVMList, b3Parts)
|
||||
'Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(m_PartVMList(0).nPartId, "Box")
|
||||
'EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Parts)
|
||||
'For PartIndex = 1 To m_PartVMList.Count - 1
|
||||
' Dim b3Part As New BBox3d
|
||||
' nBoxLayerId = EgtGetFirstNameInGroup(m_PartVMList(PartIndex).nPartId, "Box")
|
||||
' EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Part)
|
||||
' b3Parts.Add(b3Part)
|
||||
'Next
|
||||
Dim b3RawPart As New BBox3d
|
||||
EgtGetRawPartBBox(nRawPartId, b3RawPart)
|
||||
Dim dMinValue As Double = 0
|
||||
@@ -238,19 +247,20 @@ Public Class MyMachGroupVM
|
||||
If EgtModifyRawPartSize(nRawPartId, MyMachGroupM.dL, dValue, MyMachGroupM.dH) Then
|
||||
' riporto il grezzo nell'angolo tavola di origine
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim p3OrigOnTab As Point3d
|
||||
Select Case CurrentMachine.OrigCorner
|
||||
Case MCH_CR.BL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.BR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
End Select
|
||||
EgtMoveToCornerRawPart(nRawPartId, p3OrigOnTab, CurrentMachine.OrigCorner)
|
||||
Configuration.SelectCorner(b3Tab, nRawPartId)
|
||||
'EgtGetTableArea(1, b3Tab)
|
||||
'Dim p3OrigOnTab As Point3d
|
||||
'Select Case CurrentMachine.OrigCorner
|
||||
' Case MCH_CR.BL
|
||||
' p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
' Case MCH_CR.BR
|
||||
' p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
' Case MCH_CR.TL
|
||||
' p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
' Case MCH_CR.TR
|
||||
' p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
'End Select
|
||||
'EgtMoveToCornerRawPart(nRawPartId, p3OrigOnTab, CurrentMachine.OrigCorner)
|
||||
' sposto tutti i pezzi di quanto si e' accorciato il grezzo
|
||||
If CurrentMachine.NestingCorner = MCH_CR.TR OrElse CurrentMachine.NestingCorner = MCH_CR.TL Then
|
||||
For Each Part In m_PartVMList
|
||||
|
||||
@@ -925,18 +925,19 @@ Public Class OnlyProdManagerVM
|
||||
Dim bShowBuilding As Boolean = False
|
||||
Dim bShowSolid As Boolean = False
|
||||
Dim nSelPartId As Integer = GDB_ID.NULL
|
||||
If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' verifico se assemblato e lo annullo per salvataggio
|
||||
bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
' se vista singolo pezzo
|
||||
Else
|
||||
bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' se pezzo selezionato lo segno e metto vista tutti
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then nSelPartId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
|
||||
Map.refProjectVM.BTLStructureVM.ShowAll(False)
|
||||
End If
|
||||
Configuration.ShowAllPieces(bShowBuilding, bShowSolid, nSelPartId, True, True)
|
||||
'If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' verifico se assemblato e lo annullo per salvataggio
|
||||
' bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
' If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
' ' se vista singolo pezzo
|
||||
'Else
|
||||
' bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' ' se pezzo selezionato lo segno e metto vista tutti
|
||||
' If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then nSelPartId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
|
||||
' Map.refProjectVM.BTLStructureVM.ShowAll(False)
|
||||
'End If
|
||||
|
||||
Dim sDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_GENERAL, K_LASTUPDATEDIR, "", sDir)
|
||||
@@ -1245,26 +1246,27 @@ Public Class OnlyProdManagerVM
|
||||
ReloadBTLStructure()
|
||||
|
||||
' elimino i pezzi da sovrascrivere nel progetto corrente
|
||||
For Each BTLPartToOverwriteWith In UpdateBTLWndVM.BTLPartList
|
||||
If BTLPartToOverwriteWith.bInsert Then
|
||||
Dim BTLPartToUpdate As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPDN = BTLPartToOverwriteWith.nPDN)
|
||||
' se BTLPartToUpdate è Nothing significa che il pezzo è nuovo e quindi basta accodarlo senza eliminare nulla
|
||||
If Not IsNothing(BTLPartToUpdate) Then
|
||||
Dim nPartToDeleteId As Integer = BTLPartToUpdate.nPartId
|
||||
Dim nCurrPartId = EgtGetCurrPart()
|
||||
EgtErase(nPartToDeleteId)
|
||||
nCurrPartId = EgtGetCurrPart()
|
||||
' verifico se rimuovere sezione dalla lista
|
||||
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToUpdate AndAlso x.Section = BTLPartToUpdate.Section) Then
|
||||
Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToUpdate.Section)
|
||||
End If
|
||||
' rimuovo dalla lista pezzi
|
||||
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToUpdate)
|
||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Configuration.DeletePieces(UpdateBTLWndVM.BTLPartList)
|
||||
'For Each BTLPartToOverwriteWith In UpdateBTLWndVM.BTLPartList
|
||||
' If BTLPartToOverwriteWith.bInsert Then
|
||||
' Dim BTLPartToUpdate As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPDN = BTLPartToOverwriteWith.nPDN)
|
||||
' ' se BTLPartToUpdate è Nothing significa che il pezzo è nuovo e quindi basta accodarlo senza eliminare nulla
|
||||
' If Not IsNothing(BTLPartToUpdate) Then
|
||||
' Dim nPartToDeleteId As Integer = BTLPartToUpdate.nPartId
|
||||
' Dim nCurrPartId = EgtGetCurrPart()
|
||||
' EgtErase(nPartToDeleteId)
|
||||
' nCurrPartId = EgtGetCurrPart()
|
||||
' ' verifico se rimuovere sezione dalla lista
|
||||
' If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToUpdate AndAlso x.Section = BTLPartToUpdate.Section) Then
|
||||
' Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToUpdate.Section)
|
||||
' End If
|
||||
' ' rimuovo dalla lista pezzi
|
||||
' Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToUpdate)
|
||||
' Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
|
||||
' Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
|
||||
' End If
|
||||
' End If
|
||||
'Next
|
||||
|
||||
' salvo gli id degli AsseBase presenti nel progetto corrente
|
||||
Dim AsseBaseIdList As New List(Of Integer)
|
||||
@@ -1451,11 +1453,12 @@ Public Class OnlyProdManagerVM
|
||||
' se assemblato me lo segno e lo smonto
|
||||
Dim bShowBuilding As Boolean = False
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
|
||||
If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' verifico se assemblato e lo annullo per salvataggio
|
||||
bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
Configuration.ShowAllPieces(bShowBuilding)
|
||||
'If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' verifico se assemblato e lo annullo per salvataggio
|
||||
' bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
' If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
'End If
|
||||
End If
|
||||
|
||||
' per ogni BTLInfo nel progetto riporto il relativo nome del BTL
|
||||
|
||||
@@ -257,11 +257,12 @@ Public Class OptimizePanelVM
|
||||
m_bNestingRunning = True
|
||||
' se vista tutti i pezzi
|
||||
Dim bShowBuilding As Boolean = False
|
||||
If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' verifico se assemblato e lo annullo per salvataggio
|
||||
bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
Configuration.ShowAllPieces(bShowBuilding)
|
||||
'If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' verifico se assemblato e lo annullo per salvataggio
|
||||
' bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
' If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
'End If
|
||||
Dim NestingRunningWndVM As New NestingRunningWndVM(m_SelPartType.Id, BTLPart)
|
||||
Dim NestingRunningWnd As New NestingRunningWndV(Application.Current.MainWindow, NestingRunningWndVM)
|
||||
NestingRunningWnd.ShowDialog()
|
||||
|
||||
@@ -562,15 +562,16 @@ Public Class ProjManagerVM
|
||||
Dim bShowSolid As Boolean = False
|
||||
If bShowLoading Then LoadingWndHelper.OpenLoadingWnd(ActiveIds.SAVEPROJ, 1, EgtMsg(63007), "", 100) ' Project saving
|
||||
' se vista tutti i pezzi
|
||||
If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' verifico se assemblato e lo annullo per salvataggio
|
||||
bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
' se vista singolo pezzo
|
||||
Else
|
||||
bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
End If
|
||||
Configuration.ShowAllPieces(bShowBuilding, bShowSolid, True, False)
|
||||
'If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' verifico se assemblato e lo annullo per salvataggio
|
||||
' bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
' If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
' ' se vista singolo pezzo
|
||||
'Else
|
||||
' bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
'End If
|
||||
' imposto ProjId di caricamento
|
||||
m_nLoadingProjId = CurrProj.nProjId
|
||||
Map.refSceneHostVM.SaveProject()
|
||||
@@ -859,18 +860,19 @@ Public Class ProjManagerVM
|
||||
Dim bShowBuilding As Boolean = False
|
||||
Dim bShowSolid As Boolean = False
|
||||
Dim nSelPartId As Integer = GDB_ID.NULL
|
||||
If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' verifico se assemblato e lo annullo per salvataggio
|
||||
bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
' se vista singolo pezzo
|
||||
Else
|
||||
bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' se pezzo selezionato lo segno e metto vista tutti
|
||||
nSelPartId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
|
||||
Map.refProjectVM.BTLStructureVM.ShowAll(False)
|
||||
End If
|
||||
Configuration.ShowAllPieces(bShowBuilding, bShowSolid, nSelPartId, True)
|
||||
'If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' verifico se assemblato e lo annullo per salvataggio
|
||||
' bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
' If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
' ' se vista singolo pezzo
|
||||
'Else
|
||||
' bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
' If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' ' se pezzo selezionato lo segno e metto vista tutti
|
||||
' nSelPartId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
|
||||
' Map.refProjectVM.BTLStructureVM.ShowAll(False)
|
||||
'End If
|
||||
|
||||
Dim sDir As String = String.Empty
|
||||
GetMainPrivateProfileString(S_GENERAL, K_LASTUPDATEDIR, "", sDir)
|
||||
@@ -1179,26 +1181,27 @@ Public Class ProjManagerVM
|
||||
ReloadBTLStructure()
|
||||
|
||||
' elimino i pezzi da sovrascrivere nel progetto corrente
|
||||
For Each BTLPartToOverwriteWith In UpdateBTLWndVM.BTLPartList
|
||||
If BTLPartToOverwriteWith.bInsert Then
|
||||
Dim BTLPartToUpdate As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPDN = BTLPartToOverwriteWith.nPDN)
|
||||
' se BTLPartToUpdate è Nothing significa che il pezzo è nuovo e quindi basta accodarlo senza eliminare nulla
|
||||
If Not IsNothing(BTLPartToUpdate) Then
|
||||
Dim nPartToDeleteId As Integer = BTLPartToUpdate.nPartId
|
||||
Dim nCurrPartId = EgtGetCurrPart()
|
||||
EgtErase(nPartToDeleteId)
|
||||
nCurrPartId = EgtGetCurrPart()
|
||||
' verifico se rimuovere sezione dalla lista
|
||||
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToUpdate AndAlso x.Section = BTLPartToUpdate.Section) Then
|
||||
Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToUpdate.Section)
|
||||
End If
|
||||
' rimuovo dalla lista pezzi
|
||||
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToUpdate)
|
||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Configuration.DeletePieces(UpdateBTLWndVM.BTLPartList)
|
||||
'For Each BTLPartToOverwriteWith In UpdateBTLWndVM.BTLPartList
|
||||
' If BTLPartToOverwriteWith.bInsert Then
|
||||
' Dim BTLPartToUpdate As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPDN = BTLPartToOverwriteWith.nPDN)
|
||||
' ' se BTLPartToUpdate è Nothing significa che il pezzo è nuovo e quindi basta accodarlo senza eliminare nulla
|
||||
' If Not IsNothing(BTLPartToUpdate) Then
|
||||
' Dim nPartToDeleteId As Integer = BTLPartToUpdate.nPartId
|
||||
' Dim nCurrPartId = EgtGetCurrPart()
|
||||
' EgtErase(nPartToDeleteId)
|
||||
' nCurrPartId = EgtGetCurrPart()
|
||||
' ' verifico se rimuovere sezione dalla lista
|
||||
' If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToUpdate AndAlso x.Section = BTLPartToUpdate.Section) Then
|
||||
' Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToUpdate.Section)
|
||||
' End If
|
||||
' ' rimuovo dalla lista pezzi
|
||||
' Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToUpdate)
|
||||
' Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
|
||||
' Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
|
||||
' End If
|
||||
' End If
|
||||
'Next
|
||||
|
||||
' salvo gli id degli AsseBase presenti nel progetto corrente
|
||||
Dim AsseBaseIdList As New List(Of Integer)
|
||||
@@ -1380,11 +1383,12 @@ Public Class ProjManagerVM
|
||||
' se assemblato me lo segno e lo smonto
|
||||
Dim bShowBuilding As Boolean = False
|
||||
If Map.refMainMenuVM.SelPage = Pages.VIEW Then
|
||||
If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' verifico se assemblato e lo annullo per salvataggio
|
||||
bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
Configuration.ShowAllPieces(bShowBuilding)
|
||||
'If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' ' verifico se assemblato e lo annullo per salvataggio
|
||||
' bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
' If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
'End If
|
||||
End If
|
||||
|
||||
' per ogni BTLInfo nel progetto riporto il relativo nome del BTL
|
||||
|
||||
@@ -91,12 +91,12 @@ Public Class ProjectVM
|
||||
m_BottomPanel_Visibility = IsVisible
|
||||
End Sub
|
||||
|
||||
'Private m_PartManager_Visibility As Boolean = True
|
||||
'Public ReadOnly Property PartManager_Visibility As Visibility
|
||||
' Get
|
||||
' Return If((Map.refMainMenuVM.SelPage = Pages.VIEW OrElse Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.SelectionType = BTLStructureVM.SelectionTypes.SELECT_ AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
|
||||
' End Get
|
||||
'End Property
|
||||
Private m_PartManager_Visibility As Boolean = True
|
||||
Public ReadOnly Property PartManager_Visibility As Visibility
|
||||
Get
|
||||
Return If(Map.refMainMenuVM.SelPage = Pages.VIEW AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.SelectionType = BTLStructureVM.SelectionTypes.SELECT_ AndAlso Not Map.refFreeContourManagerVM.bIsActive, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_FeatureManager_Visibility As Boolean = True
|
||||
Public Property FeatureManager_Visibility As Visibility
|
||||
|
||||
@@ -18,7 +18,8 @@ Public Class ShowBeamPanelVM
|
||||
m_ShowSolid_IsEnabled = False
|
||||
m_ShowBuilding_IsEnabled = Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Map.refProjectVM.BTLStructureVM.BTLStructureM.nAsseBaseId <> GDB_ID.NULL
|
||||
Else
|
||||
m_ShowSolid_IsEnabled = IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup)
|
||||
'm_ShowSolid_IsEnabled = IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup) OrElse IsNothing(Map.refMachGroupPanelVM.SelectedMachGroup.SelPart)
|
||||
m_ShowSolid_IsEnabled = Map.refMainMenuVM.SelPage <> Pages.ONLYPRODPAGE
|
||||
m_ShowBuilding_IsEnabled = False
|
||||
End If
|
||||
UpdatePartBtnIsEnabled()
|
||||
@@ -144,9 +145,10 @@ Public Class ShowBeamPanelVM
|
||||
|
||||
Private Sub UpdatePartBtnIsEnabled()
|
||||
Map.refCALCPanelVM.PartShowAllChanged()
|
||||
Configuration.UpdateGraphics()
|
||||
'Map.refLeftPanelVM.PartShowAllChanged()
|
||||
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
|
||||
If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
|
||||
'If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
|
||||
'If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<EgtBEAMWALL:FreeContourInputV DataContext="{StaticResource FreeContourInputVM}"
|
||||
Visibility="{Binding Tag.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"/>
|
||||
Visibility="{Binding DataContext.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"/>
|
||||
<EgtBEAMWALL:PartManagerV DataContext="{StaticResource PartManagerVM}"
|
||||
Tag="{Binding Tag.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"
|
||||
Visibility="{Binding Tag.PartManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"/>
|
||||
Visibility="{Binding DataContext.PartManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:ProjWndV}}}"/>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
Imports EgtBEAMWALL.Core.ConstGen
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class ProjWndVM
|
||||
Inherits VMBase
|
||||
|
||||
#Region "FIELD & PROPERTIES"
|
||||
|
||||
@@ -10,12 +12,28 @@ Public Class ProjWndVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property FreeContourManager_Visibility As Visibility
|
||||
Private m_FreeContourManager_Visibility As Boolean = False
|
||||
Public Property FreeContourManager_Visibility As Visibility
|
||||
Get
|
||||
Return Map.refProjectVM.FreeContourManager_Visibility
|
||||
Return If(m_FreeContourManager_Visibility, Visibility.Visible, Visibility.Collapsed)
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_FreeContourManager_Visibility = (value = Visibility.Visible)
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFreeContourManager_Visibility(IsVisible As Boolean)
|
||||
m_FreeContourManager_Visibility = IsVisible
|
||||
NotifyPropertyChanged(NameOf(FreeContourManager_Visibility))
|
||||
End Sub
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New()
|
||||
Map.SetRefProjWndVM(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtBEAMWALL.Core
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Module Configuration
|
||||
|
||||
''' <summary>
|
||||
''' trovo ed evidenzio MachGroup e Duplo di questo pezzo
|
||||
''' </summary>
|
||||
''' <param name="nSelBTLPartId">Id pezzo</param>
|
||||
Friend Sub SetSearchPiece(nSelBTLPartId As Integer)
|
||||
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.SetSearchFound()
|
||||
bFound = True
|
||||
Else
|
||||
Part.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
If bFound Then
|
||||
Machgroup.SetSearchFound()
|
||||
Else
|
||||
Machgroup.ResetSearchFound()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' deevidenzio MachGroup e Duplo di questo pezzo
|
||||
''' </summary>
|
||||
''' <param name="nSelBTLPartId">Id pezzo</param>
|
||||
Friend Sub ResetSearchPiece(nSelBTLPartId As Integer)
|
||||
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 Sub
|
||||
|
||||
''' <summary>
|
||||
''' aggiornamento grafica
|
||||
''' </summary>
|
||||
Friend Sub UpdateGraphics()
|
||||
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.PartShowAllChanged()
|
||||
If Not IsNothing(Map.refBTLPartManagerVM) Then Map.refBTLPartManagerVM.PartShowAllChanged()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' evidenzio BTLPart di questo pezzo
|
||||
''' </summary>
|
||||
''' <param name="nPartId">Id pezzo</param>
|
||||
Friend Sub SetSearch(nPartId As Integer)
|
||||
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
Dim nDuploOriginalId As Integer = 0
|
||||
If EgtGetInfo(nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).SetSearchFound()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' deevidenzio BTLPart di questo pezzo
|
||||
''' </summary>
|
||||
''' <param name="nPartId">Id pezzo</param>
|
||||
Friend Sub ResetSearch(nPartId As Integer)
|
||||
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
|
||||
Dim nDuploOriginalId As Integer = 0
|
||||
If EgtGetInfo(nPartId, GDB_SI_DUPSOU, nDuploOriginalId) AndAlso nDuploOriginalId > 0 AndAlso nDuploOriginalId = Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).nPartId Then
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList(BTLPartIndex).ResetSearchFound()
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' modalita' assemblato
|
||||
''' </summary>
|
||||
''' <param name="bShowBuilding">booleano visualizza modalita' assemblato</param>
|
||||
Friend Sub AssembledMode(bShowBuilding As Boolean)
|
||||
If bShowBuilding AndAlso Map.refShowBeamPanelVM.bShowAll Then
|
||||
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
|
||||
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' vista di tutti i pezzi
|
||||
''' </summary>
|
||||
''' <param name="bShowBuilding">booleano visualizza modalita' assemblato</param>
|
||||
''' <param name="bShowSolid">booleano visualizza solido</param>
|
||||
''' <param name="nSelPartId">Id pezzo</param>
|
||||
''' <param name="bSolid">booleano controllo solido</param>
|
||||
''' <param name="bSelPieces">booleano controllo se pezzo selezionato</param>
|
||||
Friend Sub ShowAllPieces(bShowBuilding As Boolean, Optional bShowSolid As Boolean = False, Optional nSelPartId As Integer = 0, Optional bSolid As Boolean = False, Optional bSelPieces As Boolean = False)
|
||||
If Map.refShowBeamPanelVM.bShowAll Then
|
||||
' verifico se assemblato e lo annullo per salvataggio
|
||||
bShowBuilding = Map.refShowBeamPanelVM.ShowBuilding_IsChecked
|
||||
If bShowBuilding Then Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
|
||||
' se vista singolo pezzo
|
||||
ElseIf Not Map.refShowBeamPanelVM.bShowAll AndAlso bSolid Then
|
||||
bShowSolid = Map.refShowBeamPanelVM.ShowSolid_IsChecked
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(GDB_ID.NULL, False, False)
|
||||
' se pezzo selezionato lo segno e metto vista tutti
|
||||
If bSelPieces Then
|
||||
If Not IsNothing(Map.refProjectVM.BTLStructureVM) AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then nSelPartId = Map.refProjectVM.BTLStructureVM.SelBTLPart.nPartId
|
||||
Map.refProjectVM.BTLStructureVM.ShowAll(False)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' elimino i pezzi da sovrascrivere nel progetto corrente
|
||||
''' </summary>
|
||||
''' <param name="BTLPartList">Lista BTLPart</param>
|
||||
Friend Sub DeletePieces(BTLPartList As ObservableCollection(Of BTLPartToUpdate))
|
||||
For Each BTLPartToOverwriteWith In BTLPartList
|
||||
If BTLPartToOverwriteWith.bInsert Then
|
||||
Dim BTLPartToUpdate As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(x) x.nPDN = BTLPartToOverwriteWith.nPDN)
|
||||
' se BTLPartToUpdate è Nothing significa che il pezzo è nuovo e quindi basta accodarlo senza eliminare nulla
|
||||
If Not IsNothing(BTLPartToUpdate) Then
|
||||
Dim nPartToDeleteId As Integer = BTLPartToUpdate.nPartId
|
||||
Dim nCurrPartId = EgtGetCurrPart()
|
||||
EgtErase(nPartToDeleteId)
|
||||
nCurrPartId = EgtGetCurrPart()
|
||||
' verifico se rimuovere sezione dalla lista
|
||||
If Not Map.refProjectVM.BTLStructureVM.BTLPartVMList.Any(Function(x) x IsNot BTLPartToUpdate AndAlso x.Section = BTLPartToUpdate.Section) Then
|
||||
Map.refProjectVM.BTLStructureVM.SectionList.Remove(BTLPartToUpdate.Section)
|
||||
End If
|
||||
' rimuovo dalla lista pezzi
|
||||
Dim Index As Integer = Map.refProjectVM.BTLStructureVM.BTLPartVMList.IndexOf(BTLPartToUpdate)
|
||||
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(Nothing)
|
||||
Map.refProjectVM.BTLStructureVM.BTLPartVMList.RemoveAt(Index)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' tolgo eventuale indicazione solido rimasta da pezzo precedente
|
||||
''' </summary>
|
||||
''' <param name="nPartId">Id pezzo</param>
|
||||
''' <param name="bShowSolid">booleano visualizzazione solido</param>
|
||||
Friend Sub DeselectSolid(Optional nPartId As Integer = 0, Optional bShowSolid As Boolean = False)
|
||||
If Map.refShowBeamPanelVM.ShowSolid_IsChecked Then
|
||||
' tolgo eventuale indicazione solido rimasta da pezzo precedente
|
||||
Map.refShowBeamPanelVM.SetShowSolid(False)
|
||||
If bShowSolid Then Map.refProjectVM.BTLStructureVM.ShowSolid(nPartId, False, False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' verifico se la dimensione e' maggiore del box minimo dei pezzi
|
||||
''' </summary>
|
||||
''' <param name="PartVMList"></param>
|
||||
''' <param name="b3Parts"></param>
|
||||
Friend Sub VerifyMaxDimension(PartVMList As ObservableCollection(Of Core.PartVM), b3Parts As BBox3d)
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(PartVMList(0).nPartId, "Box")
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Parts)
|
||||
For PartIndex = 1 To PartVMList.Count - 1
|
||||
Dim b3Part As New BBox3d
|
||||
nBoxLayerId = EgtGetFirstNameInGroup(PartVMList(PartIndex).nPartId, "Box")
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.EXACT, b3Part)
|
||||
b3Parts.Add(b3Part)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' riporto il grezzo nell'angolo tavola di origine
|
||||
''' </summary>
|
||||
''' <param name="b3Tab"></param>
|
||||
''' <param name="nRawPartId"></param>
|
||||
Friend Sub SelectCorner(b3Tab As BBox3d, nRawPartId As Integer)
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim p3OrigOnTab As Point3d
|
||||
Select Case CurrentMachine.OrigCorner
|
||||
Case MCH_CR.BL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.BR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TL
|
||||
p3OrigOnTab = New Point3d(CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
Case MCH_CR.TR
|
||||
p3OrigOnTab = New Point3d(b3Tab.DimX() - CurrentMachine.OrigOffsX, b3Tab.DimY() - CurrentMachine.OrigOffsY, 0)
|
||||
End Select
|
||||
EgtMoveToCornerRawPart(nRawPartId, p3OrigOnTab, CurrentMachine.OrigCorner)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
'''
|
||||
''' </summary>
|
||||
''' <param name="nPartId"></param>
|
||||
''' <param name="BTLStructureVM"></param>
|
||||
Friend Sub SelectedPieces(nPartId As Integer, BTLStructureVM As BTLStructureVM)
|
||||
EgtBeamShowFacesName(False)
|
||||
EgtBeamShowLoadingSide(False, False)
|
||||
Map.refProjectVM.MacroFeature_IsEnabled = True
|
||||
' se modalità building, la tolgo
|
||||
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
|
||||
BTLStructureVM.ShowBuilding(False, False)
|
||||
End If
|
||||
|
||||
BTLStructureVM.SceneSelPartSelection()
|
||||
' seleziono pezzo in Db geometrico
|
||||
EgtBeamSetPart(nPartId)
|
||||
EgtBeamShowFacesName(True)
|
||||
Dim bLoadingSideShow As Boolean = (BTLStructureVM.nPROJTYPE = BWType.BEAM)
|
||||
Dim bLeftToRight As Boolean = Not (CurrentMachine.ViewDir = VT.ISO_NW OrElse CurrentMachine.ViewDir = VT.ISO_NE)
|
||||
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
@@ -40,6 +40,7 @@ Module Map
|
||||
Private m_refPartInRawPartManagerVM As PartInRawPartManagerVM
|
||||
Private m_refFeatureListManagerVM As FeatureListManagerVM
|
||||
Private m_refProdProjManagerVM As ProdProjManagerVM
|
||||
Private m_refProjWndVM As ProjWndVM
|
||||
'Private m_refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
||||
'Private m_refRawPartTabVM As RawPartTabVM
|
||||
'Private m_refNestingTabVM As NestingTabVM
|
||||
@@ -283,6 +284,12 @@ Module Map
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property refProjWndVM As ProjWndVM
|
||||
Get
|
||||
Return m_refProjWndVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
'Public ReadOnly Property refOpenProjectFileDialogVM As OpenProjectFileDialogVM
|
||||
' Get
|
||||
@@ -526,6 +533,11 @@ Module Map
|
||||
Return Not IsNothing(m_refProdProjManagerVM)
|
||||
End Function
|
||||
|
||||
Friend Function SetRefProjWndVM(ProjWndVM As ProjWndVM) As Boolean
|
||||
m_refProjWndVM = ProjWndVM
|
||||
Return Not IsNothing(m_refProjWndVM)
|
||||
End Function
|
||||
|
||||
|
||||
'Friend Function SetRefOpenProjectFileDialogVM(OpenProjectFileDialogVM As OpenProjectFileDialogVM) As Boolean
|
||||
' m_refOpenProjectFileDialogVM = OpenProjectFileDialogVM
|
||||
@@ -603,7 +615,7 @@ Module Map
|
||||
Not IsNothing(m_refOnlyProdManagerVM) AndAlso Not IsNothing(m_refBTLPartManagerVM) AndAlso
|
||||
Not IsNothing(m_refRawPartManagerVM) AndAlso Not IsNothing(m_refPartInRawPartManagerVM) AndAlso
|
||||
Not IsNothing(m_refFeatureListManagerVM) AndAlso Not IsNothing(m_refProdProjManagerVM) AndAlso
|
||||
LibMap.EndInit()
|
||||
Not IsNothing(m_refProjWndVM) AndAlso LibMap.EndInit()
|
||||
End Function
|
||||
|
||||
#End Region ' Init
|
||||
|
||||
Reference in New Issue
Block a user