b60346cba6
- Gestisce la creazione del rabbet sui frame, - nell'hardwaremanager aggiunta dei check sui gruppetti di parametri.
387 lines
22 KiB
XML
387 lines
22 KiB
XML
<UserControl x:Class="PartPageV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:EgtDOORCreator"
|
|
xmlns:EgtDOORCreator="clr-namespace:EgtDOORCreator"
|
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
|
|
|
<UserControl.Resources>
|
|
<EgtDOORCreator:SplitConverter x:Key="SplitConverter"/>
|
|
<local:DoorVisibilityConverter x:Key="DoorVisibilityConverter"/>
|
|
<local:TemplateListConverter x:Key="TemplateListConverter"/>
|
|
<EgtDOORCreator:TrueToFalse x:Key="TrueToFalse"/>
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="5*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Margin="0,0,0,2" Grid.Column="1" IsEnabled="{Binding IsReadOnly}">
|
|
<Grid.InputBindings>
|
|
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
|
<KeyBinding Key="F1" Command="{Binding DataContext.GuideCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/>
|
|
</Grid.InputBindings>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!--<GroupBox Header="{Binding GeneralMsg}" Margin="0,0,0,0"
|
|
Visibility="{Binding CurrProject.DoorList,
|
|
Converter={StaticResource DoorVisibilityConverter}}">-->
|
|
<GroupBox>
|
|
<GroupBox.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding GeneralMsg}" Width="Auto"/>
|
|
<Button Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="5"
|
|
VerticalAlignment="Stretch"
|
|
Height="Auto"
|
|
Padding="2,0,2,2"
|
|
Margin="5,0,0,0"
|
|
Visibility="{Binding OrderButtonVisibility}"
|
|
Content="Order" Command="{Binding OrderCmd}"/>
|
|
</StackPanel>
|
|
</GroupBox.Header>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="1*"/>
|
|
<!--<RowDefinition Height="Auto"/>-->
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border BorderBrush="Gainsboro" BorderThickness="1" Grid.Column="2" Grid.ColumnSpan="4"
|
|
Grid.RowSpan="5" Margin="5,-2,2,0" CornerRadius="3"/>
|
|
<TextBlock Grid.Column="3" Grid.Row="0" Text="{Binding EdgeMsg}" VerticalAlignment="Center"
|
|
Style="{StaticResource DoorParamsTxBl}" Margin="2,0,5,0"/>
|
|
<TextBlock Grid.Column="4" Grid.Row="0" Grid.ColumnSpan="2" Text="{Binding OverMaterialMsg}" VerticalAlignment="Center"
|
|
Style="{StaticResource DoorParamsTxBl}" Margin="2,0,5,0"/>
|
|
<!--General-->
|
|
|
|
<TextBlock Text="{Binding WidthMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="2,2,0,2"
|
|
Grid.Row="0"/>
|
|
<TextBox Grid.Column="1" Grid.Row="0"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Text="{Binding CurrPart.Width, UpdateSourceTrigger=PropertyChanged}"
|
|
ToolTip="{Binding CurrPart.ToolTipEvaluatedWidth}"
|
|
Margin="0.4,2,39.6,3.2"
|
|
VerticalAlignment="Stretch"
|
|
Height="Auto" IsReadOnly="{Binding IsRaedOnly}"/>
|
|
|
|
<TextBlock Grid.Row="1" Text="{Binding HeightMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="2,0,0,2"/>
|
|
<TextBox Grid.Column="1" Grid.Row="1" Style="{StaticResource DoorParamsTxBx}"
|
|
Text="{Binding CurrPart.Height, UpdateSourceTrigger=PropertyChanged}"
|
|
Margin="0.4,2,39.6,3.2" VerticalAlignment="Stretch" Height="Auto"
|
|
ToolTip="{Binding CurrPart.ToolTipEvaluatedHeight}"
|
|
IsReadOnly="{Binding IsRaedOnly}"/>
|
|
|
|
<TextBlock Grid.Row="2" Text="{Binding ThicknessMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="2,0,0,2"/>
|
|
<TextBox Grid.Column="1" Grid.Row="2" Style="{StaticResource DoorParamsTxBx}"
|
|
Text="{Binding CurrPart.Thickness, UpdateSourceTrigger=PropertyChanged}"
|
|
Margin="0.4,2,39.6,3.2" VerticalAlignment="Stretch" Height="Auto"
|
|
ToolTip="{Binding CurrPart.ToolTipEvaluatedThickness}"
|
|
IsReadOnly="{Binding IsRaedOnly}"/>
|
|
|
|
<TextBlock Grid.Row="3" Text="{Binding SwingMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="2,0,0,2"/>
|
|
<ComboBox Grid.Column="1" Grid.Row="3" Margin="0.4,2,39.6,3.2"
|
|
ItemsSource="{Binding CurrPart.SwingTypeList}"
|
|
SelectedItem="{Binding CurrPart.Swing}"
|
|
Style="{StaticResource DoorParamsCmBx}" Height="Auto"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
|
|
<TextBlock Grid.Row="4" Text="{Binding WeightMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="2,0,0,2" Visibility="{Binding CurrPart.VisibilityWeight}"/>
|
|
|
|
<TextBox Grid.Row="4" Grid.Column="1"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Text="{Binding CurrPart.Weight, UpdateSourceTrigger=PropertyChanged}"
|
|
ToolTip="{Binding CurrPart.ToolTipEvaluatedWeight}"
|
|
Margin="0.4,2,39.6,3.2" VerticalAlignment="Stretch" Height="Auto"
|
|
Visibility="{Binding CurrPart.VisibilityWeight}"/>
|
|
|
|
<!--Seconda colonna -->
|
|
<!-- Profiles-->
|
|
<TextBlock Grid.Column="2" Grid.Row="1" Text="{Binding LockedgeMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="20,2,0,2"/>
|
|
<ComboBox Grid.Column="3" Grid.Row="1"
|
|
ItemsSource="{Binding CurrPart.LockEdgeTypeList}"
|
|
SelectedItem="{Binding CurrPart.LockEdgeType}"
|
|
Style="{StaticResource DoorEdgeParamsCmBx}"
|
|
Margin="0.4,2,40,4"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="2"
|
|
Text="{Binding HingeedgeMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="20,2,0,2"/>
|
|
<ComboBox Grid.Column="3" Grid.Row="2"
|
|
ItemsSource="{Binding CurrPart.HingeEdgeTypeList}"
|
|
SelectedItem="{Binding CurrPart.HingeEdgeType}"
|
|
Style="{StaticResource DoorEdgeParamsCmBx}"
|
|
Margin="0.4,2,40,4"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
|
|
<!--<ComboBox.ItemContainerStyle>
|
|
<Style TargetType="ComboBoxItem">
|
|
<Setter Property="IsEnabled" Value="{Binding IsActive}" />
|
|
</Style>
|
|
</ComboBox.ItemContainerStyle>
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding Name}" Visibility="{Binding IsActive}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>-->
|
|
|
|
|
|
<TextBlock Grid.Column="2" Grid.Row="3"
|
|
Text="{Binding TopMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="20,2,0,2"/>
|
|
<ComboBox Grid.Column="3" Grid.Row="3"
|
|
ItemsSource="{Binding CurrPart.TopEdgeTypeList}"
|
|
SelectedItem="{Binding CurrPart.TopType}"
|
|
Style="{StaticResource DoorEdgeParamsCmBx}"
|
|
Margin="0.4,2,40,4"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
|
|
<TextBlock Grid.Row="4" Grid.Column="2"
|
|
Text="{Binding BottomMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="20,2,0,2"/>
|
|
<ComboBox Grid.Column="3" Grid.Row="4"
|
|
ItemsSource="{Binding CurrPart.BottomEdgeTypeList}"
|
|
SelectedItem="{Binding CurrPart.BottomType}"
|
|
Style="{StaticResource DoorEdgeParamsCmBx}"
|
|
Margin="0.4,2,40,4"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
|
|
<TextBlock Grid.Row="5" Grid.Column="2"
|
|
Visibility="{Binding DispositionVisibility}"
|
|
Text="{Binding DispositionMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="20,2,0,2"/>
|
|
<ComboBox Grid.Column="3" Grid.Row="5"
|
|
Visibility="{Binding DispositionVisibility}"
|
|
ItemsSource="{Binding CurrPart.DispositionList}"
|
|
SelectedItem="{Binding CurrPart.DispositionItem}"
|
|
DisplayMemberPath="Name"
|
|
Style="{StaticResource DoorEdgeParamsCmBx}"
|
|
Margin="0.4,2,40,4"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
<!--Machining-->
|
|
<CheckBox Grid.Column="4" Grid.Row="1"
|
|
Name="LockEdge" Style="{StaticResource DoorParamsChBx}"
|
|
IsChecked="{Binding CurrPart.LockEdgeMachining}"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
<CheckBox Grid.Column="4" Grid.Row="2"
|
|
Name="HingeEdge" Style="{StaticResource DoorParamsChBx}"
|
|
IsChecked="{Binding CurrPart.HingeEdgeMachining}"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
<CheckBox Grid.Column="4" Grid.Row="3"
|
|
Name="Top" Style="{StaticResource DoorParamsChBx}"
|
|
IsChecked="{Binding CurrPart.TopMachining}"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
<CheckBox Grid.Column="4" Grid.Row="4"
|
|
Name="Bottom" Style="{StaticResource DoorParamsChBx}"
|
|
IsChecked="{Binding CurrPart.BottomMachining}"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
|
|
<TextBox Grid.Column="5" Grid.Row="1" Style="{StaticResource DoorParamsTxBx}"
|
|
Text="{Binding CurrPart.LockEdgeOverMaterial, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding IsChecked, ElementName=LockEdge}"
|
|
ToolTip="{Binding CurrPart.ToolTipEvaluatedLockOverMaterial}"
|
|
Margin="10,2.6,40,2" IsReadOnly="{Binding IsRaedOnly}"/>
|
|
<TextBox Grid.Column="5" Grid.Row="2" Style="{StaticResource DoorParamsTxBx}"
|
|
Text="{Binding CurrPart.HingeEdgeOverMaterial, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding IsChecked, ElementName=HingeEdge}"
|
|
ToolTip="{Binding CurrPart.ToolTipEvaluatedHingeOverMaterial}"
|
|
Margin="10,2,40,2" IsReadOnly="{Binding IsRaedOnly}"/>
|
|
<TextBox Grid.Column="5" Grid.Row="3" Style="{StaticResource DoorParamsTxBx}"
|
|
Text="{Binding CurrPart.TopOverMaterial, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding IsChecked, ElementName=Top}"
|
|
ToolTip="{Binding CurrPart.ToolTipEvaluatedTopOverMaterial}"
|
|
Margin="10,2,40,2" IsReadOnly="{Binding IsReadOnly}"/>
|
|
<TextBox Grid.Column="5" Grid.Row="4" Style="{StaticResource DoorParamsTxBx}"
|
|
Text="{Binding CurrPart.BottomOverMaterial, UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding IsChecked, ElementName=Bottom}"
|
|
ToolTip="{Binding CurrPart.ToolTipEvaluatedBottomOverMaterial}"
|
|
Margin="10,2,40,4" IsReadOnly="{Binding IsRaedOnly}"/>
|
|
|
|
</Grid>
|
|
|
|
</GroupBox>
|
|
|
|
<ItemsControl Name="DoorParamsItemsControl" Grid.Row="2" ItemsSource="{Binding CurrPart.CompoList}" Style="{StaticResource DoorParamsItemsControlStyle}">
|
|
<ItemsControl.InputBindings>
|
|
<KeyBinding Key="Enter" Command="{Binding RefreshCmd}"/>
|
|
</ItemsControl.InputBindings>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<GroupBox
|
|
Width="{Binding ActualWidth,ElementName=DoorParamsItemsControl,
|
|
Converter={StaticResource SplitConverter},ConverterParameter=2}">
|
|
<GroupBox.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding CompoType.Name}" Width="Auto"/>
|
|
<Button
|
|
ToolTip="{Binding DataContext.DeleteCompoToolTip,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
Command="{Binding DeleteCommand}" Margin="10,2,0,2"
|
|
Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}"
|
|
Focusable="False">
|
|
<Image Source="{Binding ImageButton}" Height="12" Stretch="Uniform"/>
|
|
</Button>
|
|
</StackPanel>
|
|
</GroupBox.Header>
|
|
<StackPanel >
|
|
<UniformGrid Columns="2" Visibility="{Binding TemplateVisibility}">
|
|
<!--Brand-->
|
|
<TextBlock Text="{Binding BrandMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"/>
|
|
<ComboBox ItemsSource="{Binding BrandListPart,
|
|
Converter={StaticResource TemplateListConverter}}"
|
|
Margin="0,0,0,2"
|
|
SelectedItem="{Binding SelBrandPart}"
|
|
Style="{StaticResource DoorParamsCmBx}"
|
|
IsEnabled="{Binding IsReadOnly}"/>
|
|
<!--File-->
|
|
<TextBlock Text="{Binding TemplateName}"
|
|
Style="{StaticResource DoorParamsTxBl}"/>
|
|
<ComboBox ItemsSource="{Binding FileList,
|
|
Converter={StaticResource TemplateListConverter}}"
|
|
Margin="0,0,0,2"
|
|
SelectedItem="{Binding SelFile}"
|
|
Style="{StaticResource DoorParamsCmBx}"
|
|
IsEnabled="{Binding IsReadOnly}"/>
|
|
</UniformGrid>
|
|
<!--Lista dei parametri-->
|
|
<ItemsControl ItemsSource="{Binding CompoParamList}">
|
|
<ItemsControl.Resources>
|
|
<DataTemplate DataType="{x:Type local:ComboBoxParam}">
|
|
<UniformGrid Columns="2">
|
|
<TextBlock Text="{Binding Name}"
|
|
Style="{StaticResource DoorParamsTxBl}"/>
|
|
<ComboBox ItemsSource="{Binding ItemList}" Margin="0,0,0,2"
|
|
SelectedItem="{Binding SelItem}"
|
|
Style="{StaticResource DoorParamsCmBx}"
|
|
IsEnabled="{Binding IsRaedOnly}"/>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type local:ComboBoxOnOffParam}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<CheckBox Name="ChBxBox" IsChecked="{Binding IsActive}"
|
|
Style="{StaticResource DoorParamsChBx}"
|
|
VerticalAlignment="Top"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
<TextBlock Text="{Binding Name}" Grid.Column="1"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="0,0,0,2"/>
|
|
|
|
</Grid>
|
|
<ComboBox ItemsSource="{Binding ItemList}" Grid.Column="2"
|
|
Margin="0,0,0,2"
|
|
SelectedItem="{Binding SelItem}"
|
|
Style="{StaticResource DoorParamsCmBx}"
|
|
IsEnabled="{Binding IsChecked, ElementName=ChBxBox}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type local:TextBoxParam}">
|
|
<UniformGrid Columns="2">
|
|
<UniformGrid.InputBindings>
|
|
<KeyBinding Key="Enter" Command="{Binding DataContext.RefreshCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
FocusManager.FocusedElement="{Binding ElementName=Stk}"/>
|
|
</UniformGrid.InputBindings>
|
|
|
|
<TextBlock Text="{Binding Name}"
|
|
Style="{StaticResource DoorParamsTxBl}"/>
|
|
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
Name="TxTData"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="0,0,0,2"
|
|
ToolTip="{Binding ToolTipValue}"
|
|
IsEnabled="{Binding IsReadOnly}"/>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
<DataTemplate DataType="{x:Type local:TextBoxOnOffParam}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<CheckBox Name="ChBx" IsChecked="{Binding IsActive}"
|
|
Style="{StaticResource DoorParamsChBx}"
|
|
VerticalAlignment="Top"
|
|
IsEnabled="{Binding IsRaedOnly, Converter={StaticResource TrueToFalse}}"/>
|
|
<TextBlock Text="{Binding Name}" Grid.Column="1"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Margin="0,0,0,2"/>
|
|
|
|
</Grid>
|
|
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}" Grid.Column="2"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
IsEnabled="{Binding IsChecked, ElementName=ChBx}"
|
|
Margin="0,0,0,2"
|
|
ToolTip="{Binding ToolTipValue,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.Resources>
|
|
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
</Grid>
|
|
<ContentControl Grid.Column="0" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
|
<!--<EgtDOORCreator:CompoPanelV Grid.Column="0" DataContext="{Binding CompoPanelPartVM}"/>-->
|
|
</Grid>
|
|
</UserControl>
|