diff --git a/EgtBEAMWALL.Optimizer/BTLPartManager/BTLPartManagerV.xaml b/EgtBEAMWALL.Optimizer/BTLPartManager/BTLPartManagerV.xaml
index 5901b41b..13259521 100644
--- a/EgtBEAMWALL.Optimizer/BTLPartManager/BTLPartManagerV.xaml
+++ b/EgtBEAMWALL.Optimizer/BTLPartManager/BTLPartManagerV.xaml
@@ -12,7 +12,7 @@
CornerRadius="5"
Margin="0"
Padding="0">
-
+
-
-
+ Style="{StaticResource DropDownButton_BarButtonItem}"/>
-
-
+ Style="{StaticResource DropDownButton_BarButtonItem}"/>
-
-
+ Style="{StaticResource DropDownButton_BarButtonItem}"/>
-
-
+ Style="{StaticResource DropDownButton_BarButtonItem}"/>
-
-
+ Style="{StaticResource DropDownButton_BarButtonItem}"/>
-
diff --git a/EgtBEAMWALL.Optimizer/ItemParamList/RawPartListV.xaml b/EgtBEAMWALL.Optimizer/ItemParamList/RawPartListV.xaml
index aa615905..cb0707a2 100644
--- a/EgtBEAMWALL.Optimizer/ItemParamList/RawPartListV.xaml
+++ b/EgtBEAMWALL.Optimizer/ItemParamList/RawPartListV.xaml
@@ -434,7 +434,8 @@
-
+
diff --git a/EgtBEAMWALL.Optimizer/MachGroupPanel/PartVM.vb b/EgtBEAMWALL.Optimizer/MachGroupPanel/PartVM.vb
index 84fdb2ca..b9c90940 100644
--- a/EgtBEAMWALL.Optimizer/MachGroupPanel/PartVM.vb
+++ b/EgtBEAMWALL.Optimizer/MachGroupPanel/PartVM.vb
@@ -240,7 +240,7 @@ Public Class PartVM
End If
End If
End If
- EgtSetCurrMachGroup(ParentMachGroupVM.Id)
+ EgtSetCurrMachGroup(Map.refMachGroupPanelVM.SelectedMachGroup.Id)
' lo riseleziono
EgtSelectObj(nPartId)
' resetto validazione del pezzo
@@ -484,7 +484,7 @@ Public Class PartVM
' reinserisco il pezzo nel grezzo
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
End If
- EgtSetCurrMachGroup(ParentMachGroupVM.Id)
+ EgtSetCurrMachGroup(Map.refMachGroupPanelVM.SelectedMachGroup.Id)
' lo riseleziono
EgtSelectObj(nPartId)
' resetto validazione del pezzo
@@ -738,7 +738,7 @@ Public Class PartVM
If IsNothing(ProjectManagerVM.CurrProd) Then Return
Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
' Recupero indice elemento selezionato in lista
- Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(ParentMachGroupVM.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
+ Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(SelMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
If IsNothing(SelMachGroup) Then Return
' se barra gia' assegnata a supervisore, esco
If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
@@ -769,16 +769,17 @@ Public Class PartVM
Public Sub RemovePart()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(62575), EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
- If IsNothing(ParentMachGroupVM) Then Return
+ Dim SelMachGroup As MyMachGroupVM = Map.refMachGroupPanelVM.SelectedMachGroup
' Recupero indice elemento selezionato in lista
- Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(ParentMachGroupVM.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
+ Dim Index As Integer = ParentMachGroupVM.PartVMList.IndexOf(SelMachGroup.PartVMList.FirstOrDefault(Function(x) x.nPartId = nPartId))
+ If IsNothing(SelMachGroup) Then Return
' se barra gia' assegnata a supervisore, esco
- If ParentMachGroupVM.nProduction_State >= ItemState.Assigned Then Return
- Dim SelPart As PartVM = ParentMachGroupVM.PartVMList(Index)
+ If SelMachGroup.nProduction_State >= ItemState.Assigned Then Return
+ Dim SelPart As PartVM = SelMachGroup.PartVMList(Index)
If IsNothing(SelPart) Then Return
SelPart.DeletePart()
- ParentMachGroupVM.UpdateUsage()
- ParentMachGroupVM.ResetCalcMachGroup()
+ SelMachGroup.UpdateUsage()
+ SelMachGroup.ResetCalcMachGroup()
Else
Return
End If
diff --git a/EgtBEAMWALL.Optimizer/PopUp/RawPartListPopUpV.xaml b/EgtBEAMWALL.Optimizer/PopUp/RawPartListPopUpV.xaml
index 1bcc2669..5894977d 100644
--- a/EgtBEAMWALL.Optimizer/PopUp/RawPartListPopUpV.xaml
+++ b/EgtBEAMWALL.Optimizer/PopUp/RawPartListPopUpV.xaml
@@ -19,29 +19,20 @@
Padding="0">
-
+ Glyph="{StaticResource CopyRawPart_Image}"
+ Style="{StaticResource DropDownButton_BarButtonItem}"/>
-
-
-
+ Glyph="{StaticResource Remove_Image}"
+ Style="{StaticResource DropDownButton_BarButtonItem}"/>
-
+ Glyph="{StaticResource ReOrderPart_Image}"
+ Style="{StaticResource DropDownButton_BarButtonItem}"/>
-
+ Glyph="{StaticResource ResetCalc_Image}"
+ Style="{StaticResource DropDownButton_BarButtonItem}"/>
diff --git a/EgtBEAMWALL.Optimizer/StatisticsWnd/StatisticWndV.xaml.vb b/EgtBEAMWALL.Optimizer/StatisticsWnd/StatisticWndV.xaml.vb
index e497bfa6..fd3197b2 100644
--- a/EgtBEAMWALL.Optimizer/StatisticsWnd/StatisticWndV.xaml.vb
+++ b/EgtBEAMWALL.Optimizer/StatisticsWnd/StatisticWndV.xaml.vb
@@ -24,4 +24,5 @@
m_StatisticsVM.refSaveStatisticGridControlLayout()
End If
End Sub
+
End Class
diff --git a/EgtBEAMWALL.Optimizer/StrategyManager/StrategyManagerVM.vb b/EgtBEAMWALL.Optimizer/StrategyManager/StrategyManagerVM.vb
index bbb7d5ce..edc99277 100644
--- a/EgtBEAMWALL.Optimizer/StrategyManager/StrategyManagerVM.vb
+++ b/EgtBEAMWALL.Optimizer/StrategyManager/StrategyManagerVM.vb
@@ -399,6 +399,11 @@ Public Class StrategyManagerVM
SetbIsModifyStrategy(True)
' Setto indice per capire che la strategia è stata spostata in ActiveStrategyList
m_SelTreeItem.SelAvailableStrategy.nIndexInList = 0
+ ' Riallinea tutti gli indici
+ For Index As Integer = 0 To m_SelTreeItem.StrategyList.Count - 1
+ m_SelTreeItem.StrategyList(Index).nIndexInList = Index
+ Next
+ SetUpdate_Visibility(False)
' Aggiorno le liste
m_SelTreeItem.AvailableStrategyList_View.Refresh()
m_SelTreeItem.ActiveStrategyList_View.Refresh()
@@ -427,6 +432,20 @@ Public Class StrategyManagerVM
SetbIsModifyStrategy(True)
' Setto indice per capire che la strategia è stata spostata in StrategyList
m_SelTreeItem.SelActiveStrategy.nIndexInList = -1
+ ' Trova l’elemento con indice -1
+ Dim mRemovedItemStrategyList As List(Of Strategy) = m_SelTreeItem.StrategyList.Where(Function(s) s.nIndexInList = -1).ToList()
+ For Each RemovedItemStrategy In mRemovedItemStrategyList
+ m_SelTreeItem.StrategyList.Remove(RemovedItemStrategy)
+ Next
+ ' Riallinea tutti gli indici
+ For Index As Integer = 0 To m_SelTreeItem.StrategyList.Count - 1
+ m_SelTreeItem.StrategyList(Index).nIndexInList = Index
+ Next
+ ' Reinserisco elementi rimossi
+ For Each RemovedItemStrategy In mRemovedItemStrategyList
+ m_SelTreeItem.StrategyList.Add(RemovedItemStrategy)
+ Next
+ SetUpdate_Visibility(False)
' Aggiorno le liste
m_SelTreeItem.AvailableStrategyList_View.Refresh()
m_SelTreeItem.ActiveStrategyList_View.Refresh()