Gestione Selezione multipla da Scena
This commit is contained in:
@@ -152,6 +152,7 @@ Public Class MainWindowVM
|
||||
If Not IsNothing(OmagOFFICEMap.refSplitModeVM) Then
|
||||
OmagOFFICEMap.refSplitModeVM.DeactiveSplitCut()
|
||||
OmagOFFICEMap.refSplitModeVM.DeselectWJBridgesPart()
|
||||
OmagOFFICEMap.refSplitModeVM.ResetAllMark()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -328,6 +328,19 @@
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
<StackPanel Visibility="{Binding AllExtendBtnVisibility}" Grid.Column="1" Margin="1,0,0,0">
|
||||
<ToggleButton ToolTip="{Binding AllExtendMsg}"
|
||||
Style="{StaticResource Split_ToggleButton_Img}"
|
||||
IsChecked="{Binding CreateParallelCut_IsChecked}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,0,0">
|
||||
<StackPanel>
|
||||
<Image Source="/Resources/NewIcons/Crea-taglio-parallelo.png"
|
||||
Style="{StaticResource ImgButton}"/>
|
||||
</StackPanel>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -1330,6 +1330,7 @@ Public Class SplitModeVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Forzo la fine della creazione di un elemento SplitCut
|
||||
Private Sub ResetSplitCut()
|
||||
EgtResetMark(m_IdCurrRawSolid)
|
||||
If m_IdSplitGroup <> GDB_ID.NULL Then
|
||||
@@ -1355,6 +1356,13 @@ Public Class SplitModeVM
|
||||
NotifyPropertyChanged(NameOf(RemoveCut_IsChecked))
|
||||
End Sub
|
||||
|
||||
Public Sub ResetAllMark()
|
||||
For Each Item As NameIdLsBxItem In m_ItemList
|
||||
Item.IsSelected = False
|
||||
MarkMachining(Item.Ind, False)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -2870,29 +2878,8 @@ Public Class SplitModeVM
|
||||
If Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
End If
|
||||
'' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
'EraseDirectCutPart()
|
||||
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
' DeactivateAllMachinings()
|
||||
|
||||
' Recupero pezzo per il taglio diretto
|
||||
Dim nPartId = m_IdSplitGroup
|
||||
|
||||
'-------------------------------------------------------------------------------------------------
|
||||
'' Applico la correzione di spessore lama -> anche se Offset=0! ver_2.5b1
|
||||
'Dim dTotOffset = m_dOffset
|
||||
'If m_bSawTh Then
|
||||
' dTotOffset += If(m_dOffset > 0, dThick, -dThick)
|
||||
' EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||
'Else
|
||||
' EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||
'End If
|
||||
'' Imposto affondamento e angolo di fianco sul taglio
|
||||
'EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
'EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
'-------------------------------------------------------------------------------------------------
|
||||
|
||||
' Calcolo punto di inserimento nel grezzo
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
@@ -2932,6 +2919,8 @@ Public Class SplitModeVM
|
||||
End Function
|
||||
|
||||
Friend Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Se tasto premuoto allora attivo la selezione multipla da Scena
|
||||
Dim bKeyCtrlPressed = (Keyboard.Modifiers And ModifierKeys.Control) > 0
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
@@ -3078,7 +3067,7 @@ Public Class SplitModeVM
|
||||
Return
|
||||
End If
|
||||
' recupero le info del pezzo selezionato per procedere a generare
|
||||
If m_CreateParallelCut_IsChecked Then
|
||||
If m_CreateParallelCut_IsChecked AndAlso m_IdCurrRawSolid <> GDB_ID.NULL Then
|
||||
Dim sMyName As String = ""
|
||||
EgtGetName(nId, sMyName)
|
||||
If String.Compare(sMyName, NAME_PV_CUT) = 0 Then
|
||||
@@ -3168,7 +3157,14 @@ Public Class SplitModeVM
|
||||
If m_nSelected >= 0 AndAlso EgtUnProjectPoint(e.Location, m_ptDragPrev) Then
|
||||
Dim nItemIndex = 0
|
||||
For Each Item In ItemList
|
||||
Item.IsSelected = (nItemIndex = m_nSelected)
|
||||
If Not bKeyCtrlPressed Then
|
||||
Item.IsSelected = (nItemIndex = m_nSelected)
|
||||
Else
|
||||
' procedo ad rendere attivo solo l'elemnento selezionato
|
||||
If nItemIndex = m_nSelected Then
|
||||
Item.IsSelected = True
|
||||
End If
|
||||
End If
|
||||
nItemIndex += 1
|
||||
Next
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user