-creato nuova finestra OnlyProdMovePartInRawPartWnd,

-pulizia codice
This commit is contained in:
Demetrio Cassarino
2024-04-18 16:49:06 +02:00
parent ca0e3cab8b
commit 09e6b4a633
9 changed files with 193 additions and 76 deletions
@@ -618,7 +618,12 @@ Public Class BTLPartManagerVM
''' </summary>
Public Sub AddToRawPart()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
Dim SelPart As BTLPartVM = Map.refProjectVM.BTLStructureVM.SelBTLParts(0)
Dim SelPart As BTLPartVM
If Map.refProjectVM.BTLStructureVM.SelBTLParts.Count <= 0 Then
Return
Else
SelPart = Map.refProjectVM.BTLStructureVM.SelBTLParts(0)
End If
Dim SelParts As List(Of BTLPartVM) = Map.refProjectVM.BTLStructureVM.SelBTLParts.ToList()
For Index = 0 To SelParts.Count() - 1
If IsNothing(SelParts(Index)) Then
@@ -1095,10 +1095,6 @@ Public Class BTLStructureVM
If Not IsNothing(SelBTLPart) Then
' se pezzo solido, lo riporto normale
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
@@ -250,6 +250,9 @@
<Compile Include="MainMenu\OnlyProdMainMenuV.xaml.vb">
<DependentUpon>OnlyProdMainMenuV.xaml</DependentUpon>
</Compile>
<Compile Include="MovePartInRawPartWnd\OnlyProdMovePartInRawPartWndV.xaml.vb">
<DependentUpon>OnlyProdMovePartInRawPartWndV.xaml</DependentUpon>
</Compile>
<Compile Include="NestingRunningWnd\OnlyProdNestingRunningWndV.xaml.vb">
<DependentUpon>OnlyProdNestingRunningWndV.xaml</DependentUpon>
</Compile>
@@ -644,6 +647,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MovePartInRawPartWnd\OnlyProdMovePartInRawPartWndV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="NestingRunningWnd\OnlyProdNestingRunningWndV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -49,7 +49,7 @@ Public Class MyMachGroupPanelVM
End If
End If
Map.refShowBeamPanelVM.bShowAll = False
If Map.refMainMenuVM.SelPage <> Pages.ONLYPRODPAGE Then Map.refShowBeamPanelVM.bShowAll = False
'If Map.refProjectVM.LastSelGridType = ProjectVM.GridSelTypes.PART Then
' EgtBeamShowFacesName(False)
@@ -567,7 +567,7 @@ Public Class MainMenuVM
Map.refProjectVM.SetOptimizePanel_Visibility(True)
Map.refProjectVM.NotifyAllPanelVisibility()
Map.refCALCPanelVM.SetChooseMachineBtn_Visibility(Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE AndAlso Map.refMachinePanelVM.MachineList.Count > 1 AndAlso GetMainPrivateProfileInt(S_MACH, K_CHANGEMACH, 0) = 1)
'Map.refCALCPanelVM.SetChooseMachineBtn_Visibility(True)
Map.refRawPartManagerVM.UpdateMovePartInRawPartVisibility()
Map.refStatisticsTimePanelVM.SetStatisticsTimePanel_Visibility()
If Not IsNothing(Map.refFeatureListVM.colFeature_Do) Then
@@ -11,77 +11,77 @@
IsMinimizable="False"
IsResizable="False"
Title="MovePartInRawPartWndV">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Center"
<Grid HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding MoveDirMsg}"
Style="{StaticResource OptionTextBlock}"
Grid.ColumnSpan="2"
Margin="0,5"/>
<RadioButton IsChecked="{Binding LeftIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}"
Grid.Row="1" Grid.Column="0">
<Image Source="/Resources/MovePartInRawPart/MoveLeftParts.png" Stretch="Uniform"/>
</RadioButton>
<RadioButton IsChecked="{Binding RightIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}"
Grid.Row="1" Grid.Column="1">
<Image Source="/Resources/MovePartInRawPart/MoveRightParts.png" Stretch="Uniform"/>
</RadioButton>
</Grid>
<Grid Grid.Row="1"
Margin="0,0,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding MoveDirMsg}"
Style="{StaticResource OptionTextBlock}"
Grid.ColumnSpan="2"
Margin="0,5"/>
<TextBlock Text="{Binding MoveLenMsg}"
Style="{StaticResource OptionTextBlock}"
HorizontalAlignment="Center"
Margin="0,5"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sMoveLen}"
Grid.Row="1"
Width="200"/>
</Grid>
<RadioButton IsChecked="{Binding LeftIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}"
Grid.Row="1" Grid.Column="0">
<Image Source="/Resources/MovePartInRawPart/MoveLeftParts.png" Stretch="Uniform"/>
</RadioButton>
<RadioButton IsChecked="{Binding RightIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}"
Grid.Row="1" Grid.Column="1">
<Image Source="/Resources/MovePartInRawPart/MoveRightParts.png" Stretch="Uniform"/>
</RadioButton>
</Grid>
<Grid Grid.Row="1"
<Grid Grid.Row="3"
Margin="0,0,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding MoveLenMsg}"
Style="{StaticResource OptionTextBlock}"
HorizontalAlignment="Center"
Margin="0,5"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sMoveLen}"
Grid.Row="1"
Width="200"/>
</Grid>
<Grid Grid.Row="3"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,87 @@
<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdMovePartInRawPartWndV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
IsClosable="False"
IsMinimizable="False"
IsResizable="False"
Title="MovePartInRawPartWndV">
<Grid Margin="5,5,5,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Center"
Margin="0,0,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding MoveDirMsg}"
Style="{StaticResource OptionTextBlock}"
Grid.ColumnSpan="2"
Margin="0,5"/>
<RadioButton IsChecked="{Binding LeftIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}"
Grid.Row="1" Grid.Column="0">
<Image Source="/Resources/MovePartInRawPart/MoveLeftParts.png" Stretch="Uniform"/>
</RadioButton>
<RadioButton IsChecked="{Binding RightIsChecked}"
Style="{StaticResource ToolBar_ToggleButton}"
Grid.Row="1" Grid.Column="1">
<Image Source="/Resources/MovePartInRawPart/MoveRightParts.png" Stretch="Uniform"/>
</RadioButton>
</Grid>
<Grid Grid.Row="1"
Margin="0,0,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding MoveLenMsg}"
Style="{StaticResource OptionTextBlock}"
HorizontalAlignment="Center"
Margin="0,5"/>
<EgtWPFLib5:EgtTextBox Text="{Binding sMoveLen}"
Grid.Row="1"
Width="200"/>
</Grid>
<Grid Grid.Row="3"
Margin="0,0,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Button Content="Ok"
Command="{Binding Ok_Command}"
IsDefault="True"
Grid.Column="1"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
<Button Content="Cancel"
IsCancel="True"
Grid.Column="3"
Style="{StaticResource EgtWPFLib5_InputButton}"/>
</Grid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,18 @@
Public Class OnlyProdMovePartInRawPartWndV
Private WithEvents m_MovePartInRawPartWndVM As MovePartInRawPartWndVM
Sub New(Owner As Window, MovePartInRawPartWndVM As MovePartInRawPartWndVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = MovePartInRawPartWndVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_MovePartInRawPartWndVM = MovePartInRawPartWndVM
End Sub
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_MovePartInRawPartWndVM.m_CloseWindow
Me.DialogResult = bDialogResult
End Sub
End Class
@@ -362,13 +362,17 @@ Public Class RawPartManagerVM
Public Sub MovePartInRawPart()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
Dim MovePartInRawPartWndVM As New MovePartInRawPartWndVM()
Dim MovePartInRawPartWnd As New MovePartInRawPartWndV(Application.Current.MainWindow, MovePartInRawPartWndVM)
Dim MovePartInRawPartWnd As Object
If Map.refMainMenuVM.SelPage = Pages.ONLYPRODPAGE Then
MovePartInRawPartWnd = New OnlyProdMovePartInRawPartWndV(Application.Current.MainWindow, MovePartInRawPartWndVM)
Else
MovePartInRawPartWnd = New MovePartInRawPartWndV(Application.Current.MainWindow, MovePartInRawPartWndVM)
End If
If Not MovePartInRawPartWnd.ShowDialog() Then Return
End Sub
#End Region ' MovePartInRawPart
#End Region ' Commands
End Class