869 lines
63 KiB
XML
869 lines
63 KiB
XML
<UserControl x:Class="HardwarePageV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:EgtDOORCreator"
|
|
xmlns:EgtDOORCreator="clr-namespace:EgtDOORCreator">
|
|
|
|
<UserControl.Resources>
|
|
<EgtDOORCreator:SplitConverter x:Key="SplitConverter"/>
|
|
<local:DoorVisibilityConverter x:Key="DoorVisibilityConverter"/>
|
|
<local:TemplateListConverter x:Key="TemplateListConverter"/>
|
|
</UserControl.Resources>
|
|
|
|
<Grid IsEnabled="{Binding EnablePageHardware}">
|
|
<Grid.ColumnDefinitions>
|
|
<!-- Colonna dedicata alla lista dei bottoni -->
|
|
<ColumnDefinition Width="{Binding WidthColumn1}"/>
|
|
<ColumnDefinition Width="{Binding WidthColumn2}"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="2*"/>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
<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>
|
|
|
|
<!-- La griglia che gestirà i parametri hardaware -->
|
|
<Grid Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="0">
|
|
<Grid.RowDefinitions>
|
|
<!-- Deicata al general dell'hardware-->
|
|
<RowDefinition Height="Auto"/>
|
|
<!-- dedicata alla lista dei parametri dell'hardware-->
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Genaral Hardware-->
|
|
<GroupBox Grid.Row="0" Grid.Column="0" Visibility="{Binding VisibilityGeneral}">
|
|
<GroupBox.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<!-- titolo del general-->
|
|
<TextBlock Text="{Binding GeneralMsg}" Width="Auto"/>
|
|
</StackPanel>
|
|
</GroupBox.Header>
|
|
|
|
<!-- Griglia per gestire la disposizione nel General-->
|
|
<Grid>
|
|
<!-- 3 colonne uguali -->
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- 1 riga -->
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
<!-- Nome della prima sottocartella dopo "Hinges"-->
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Margin="2,0,0,2"
|
|
Text="{Binding BrandMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"/>
|
|
<ComboBox Grid.Row="0" Grid.Column="1" Margin="0.4,2,39.6,3.2"
|
|
ItemsSource="{Binding CurrHardware.BrandList}"
|
|
SelectedItem="{Binding CurrHardware.SelBrand}"
|
|
DisplayMemberPath="ModelDirGraphic"
|
|
Style="{StaticResource DoorParamsCmBx}" Height="Auto"/>
|
|
<!-- Nome del template "StdCon" -->
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Margin="2,0,0,2"
|
|
Text="{Binding TemplateMsg}"
|
|
Visibility="{Binding CurrHardware.VisibilityTemplate}"
|
|
Style="{StaticResource DoorParamsTxBl}"/>
|
|
<ComboBox Grid.Row="1" Grid.Column="1" Margin="0.4,2,39.6,3.2"
|
|
ItemsSource="{Binding CurrHardware.TemplateList}"
|
|
SelectedItem="{Binding CurrHardware.SelTemplate}"
|
|
Visibility="{Binding CurrHardware.VisibilityTemplate}"
|
|
Style="{StaticResource DoorParamsCmBx}" Height="Auto"/>
|
|
<!-- tipologia di template "Mort/Con" -->
|
|
<TextBlock Grid.Row="2" Grid.Column="0" Margin="2,0,0,2"
|
|
Text="{Binding TypeMsg}"
|
|
Style="{StaticResource DoorParamsTxBl}"
|
|
Visibility="{Binding CurrHardware.VisibilityType}"/>
|
|
<TextBox Grid.Row="2" Grid.Column="1" Margin="0.4,0,39.6,0"
|
|
Text="{Binding CurrHardware.SelType.Name}"
|
|
Style="{StaticResource DoorParamsTxBx}" Height="Auto"
|
|
IsEnabled="{Binding CurrHardware.IsEnableType}"
|
|
Visibility="{Binding CurrHardware.VisibilityType}"/>
|
|
<!-- Griglia per gestire la disposizione nel General-->
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<!-- Gestione delle liste di parametri dell'hardware -->
|
|
<ItemsControl Grid.Row="1" Grid.Column="1"
|
|
Name="HardwareParamsItemsControl"
|
|
ItemsSource="{Binding CurrHardware.GroupChapters}"
|
|
Style="{StaticResource DoorParamsItemsControlStyle}">
|
|
|
|
<ItemsControl.ItemTemplateSelector>
|
|
<local:IsFixedSelector >
|
|
<!--Expander-->
|
|
<local:IsFixedSelector.Expander>
|
|
<!--Titolo della lista dei parametri-->
|
|
<DataTemplate >
|
|
<!--Titolo della lista dei parametri-->
|
|
<Expander Width="{Binding ActualWidth,ElementName=HardwareParamsItemsControl,
|
|
Converter={StaticResource SplitConverter},ConverterParameter=2}"
|
|
IsExpanded="{Binding IsActiveChapter}"
|
|
Visibility="{Binding GroupVisibilityChapter}"
|
|
IsEnabled="{Binding EnableChapter}"
|
|
Style="{StaticResource HardwareExpander}">
|
|
<Expander.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding TemplateName}" Width="Auto">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="Black"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding EnableChapter}" Value="False">
|
|
<Setter Property="FontStyle" Value="Italic"/>
|
|
<Setter Property="Foreground" Value="{Binding ErrorColor}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Expander.Header>
|
|
<ContentControl>
|
|
<!-- Gestione della lista di parametri dell'hardware -->
|
|
<ItemsControl ItemsSource="{Binding CompoParamList}">
|
|
<!-- Gestione degli oggetti da caricare nella lista -->
|
|
<ItemsControl.Resources>
|
|
|
|
<!-- Gestione della ComboBoxParam -->
|
|
<DataTemplate DataType="{x:Type local:ComboBoxParam}">
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}">-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
|
|
<ComboBox ItemsSource="{Binding ItemList}" Margin="0,2,0,2"
|
|
SelectedItem="{Binding SelItem}"
|
|
Style="{StaticResource DoorParamsCmBx}"
|
|
IsEnabled="{Binding IsRaedOnly}"/>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della ComboBoxParamLua -->
|
|
<DataTemplate DataType="{x:Type local:ComboBoxParamLua}">
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}">-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<ComboBox ItemsSource="{Binding ItemList}" Margin="0,2,2,2"
|
|
Name ="ComboBoxLua"
|
|
SelectedItem="{Binding SelItem}"
|
|
Style="{StaticResource DoorParamsCmBx}"
|
|
IsEnabled="{Binding IsRaedOnly}"/>
|
|
<Button Grid.Column="1" Margin="0,2,2,2"
|
|
Visibility="{Binding VisibilityButtonAddGeometry}"
|
|
Command="{Binding DataContext.GeometryConfigCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
CommandParameter="{Binding ElementName=ComboBoxLua, Path=SelectedItem}">
|
|
<Image Source="/Resources/TopCommandBar/Add.png" Height="16" Stretch="Uniform"/>
|
|
</Button>
|
|
</Grid>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della ComboBoxParamOnOff -->
|
|
<DataTemplate DataType="{x:Type local:ComboBoxOnOffParam}">
|
|
<Grid MouseEnter="Param_MouseEnter">
|
|
<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}"
|
|
Margin="0,-2,0,2"/>
|
|
<TextBlock Text="{Binding Name}" Grid.Column="1" Margin="2,0,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}">-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</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>
|
|
|
|
<!-- Gestione della TextBoxParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxParam}">
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
|
|
</TextBlock>
|
|
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
Name="TxTData"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="0,2,0,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxDGCParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxDGCParam}">
|
|
<Grid MouseEnter="Param_MouseEnter">
|
|
<!-- 3 colonne uguali -->
|
|
<Grid.ColumnDefinitions>
|
|
<!-- Nome Parametro-->
|
|
<ColumnDefinition Width="10*"/>
|
|
<!-- Valore Parametro-->
|
|
<ColumnDefinition Width="5*"/>
|
|
<!-- Simbolo di somma-->
|
|
<ColumnDefinition Width="0.6*"/>
|
|
<!-- Combo delle costanti-->
|
|
<ColumnDefinition Width="4.1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- 1 riga -->
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="-3,2,0,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
<TextBlock Grid.Column="2"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Text="+"
|
|
Margin="0,2,0,2"/>
|
|
<ComboBox ItemsSource="{Binding ConstList}" Grid.Column="3"
|
|
Margin="0,2,0,2"
|
|
SelectedItem="{Binding SelConst}"
|
|
Style="{StaticResource DoorParamsCmBx}"/>
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxThicknessParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxThicknessParam}">
|
|
<Grid MouseEnter="Param_MouseEnter">
|
|
<!-- 3 colonne uguali -->
|
|
<Grid.ColumnDefinitions>
|
|
<!-- Nome Parametro-->
|
|
<ColumnDefinition Width="10*"/>
|
|
<!-- Valore Parametro-->
|
|
<ColumnDefinition Width="5*"/>
|
|
<!-- Combo delle costanti-->
|
|
<ColumnDefinition Width="4.5*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- 1 riga -->
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding IsEnableMeasure}"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="-5,2,4,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
<ComboBox ItemsSource="{Binding ConstList}" Grid.Column="2"
|
|
DisplayMemberPath="Name"
|
|
Margin="0,2,0,2"
|
|
SelectedItem="{Binding SelConst}"
|
|
Style="{StaticResource DoorParamsCmBx}"/>
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxNgeParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxNgeParam}">
|
|
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding IsActive}"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="0,2,2,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
<Button Grid.Column="1" Margin="0,2,2,2"
|
|
Command="{Binding DataContext.ImportGeometryCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
CommandParameter="{Binding DDFName}">
|
|
<Image Source="/Resources/TopCommandBar/Search.png" Height="16" Stretch="Uniform"/>
|
|
</Button>
|
|
<Button Grid.Column="2" Margin="0,2,2,2"
|
|
Command="{Binding DataContext.DeleteGeometryCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
CommandParameter="{Binding DDFName}">
|
|
<Image Source="/Resources/TopCommandBar/X.png" Height="16" Stretch="Uniform"/>
|
|
</Button>
|
|
</Grid>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxLuaParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxLuaParam}">
|
|
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding IsActive}"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="0,2,2,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
<Button Grid.Column="1" Margin="0,2,2,2"
|
|
Command="{Binding DataContext.ImportLuaCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
CommandParameter="{Binding DDFName}">
|
|
<Image Source="/Resources/TopCommandBar/Search.png" Height="16" Stretch="Uniform"/>
|
|
</Button>
|
|
</Grid>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della CheckBoxParam -->
|
|
<DataTemplate DataType="{x:Type local:CheckBoxParam}">
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<CheckBox IsChecked="{Binding IsChecked,UpdateSourceTrigger=PropertyChanged}"
|
|
Name="TxTData"
|
|
Style="{StaticResource DoorParamsChBx}"
|
|
HorizontalContentAlignment="Left"
|
|
Margin="0,2,0,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della GhostParam -->
|
|
<DataTemplate DataType="{x:Type local:GhostParam}">
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della ActivateParam -->
|
|
<DataTemplate DataType="{x:Type local:ActivateParam}">
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxParamOnOffParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxOnOffParam}">
|
|
<Grid MouseEnter="Param_MouseEnter">
|
|
<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}"
|
|
Margin="0,-2,0,2"/>
|
|
<TextBlock Text="{Binding Name}" Margin="2,2,0,2" Grid.Column="1">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</Grid>
|
|
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}" Grid.Column="2"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
IsEnabled="{Binding IsChecked, ElementName=ChBx}"
|
|
Margin="0,2,0,2"
|
|
ToolTip="{Binding ToolTipValue,UpdateSourceTrigger=PropertyChanged}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.Resources>
|
|
<!-- Fine gestione oggetti lsta -->
|
|
</ItemsControl>
|
|
</ContentControl>
|
|
</Expander>
|
|
</DataTemplate>
|
|
</local:IsFixedSelector.Expander>
|
|
|
|
<!--GroupBox-->
|
|
<local:IsFixedSelector.GroupBox>
|
|
<DataTemplate>
|
|
<!-- Titolo della lista dei parametri -->
|
|
<GroupBox Width="{Binding ActualWidth,ElementName=HardwareParamsItemsControl,
|
|
Converter={StaticResource SplitConverter},ConverterParameter=2}">
|
|
<GroupBox.Header>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="{Binding TemplateName}" Width="Auto"/>
|
|
</StackPanel>
|
|
</GroupBox.Header>
|
|
<ContentControl>
|
|
<!-- Gestione della lista di parametri dell'hardware -->
|
|
<ItemsControl ItemsSource="{Binding CompoParamList}">
|
|
<!-- Gestione degli oggetti da caricare nella lista -->
|
|
<ItemsControl.Resources>
|
|
|
|
<!-- Gestione della ComboBoxParam -->
|
|
<DataTemplate DataType="{x:Type local:ComboBoxParam}">
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<!--Style="{StaticResource DoorParamsTxBl}">-->
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<ComboBox ItemsSource="{Binding ItemList}" Margin="0,2,0,2"
|
|
SelectedItem="{Binding SelItem}"
|
|
Style="{StaticResource DoorParamsCmBx}"
|
|
IsEnabled="{Binding IsRaedOnly}"/>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della ComboBoxParamLua -->
|
|
<DataTemplate DataType="{x:Type local:ComboBoxParamLua}">
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}">-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<ComboBox ItemsSource="{Binding ItemList}" Margin="0,2,2,2"
|
|
SelectedItem="{Binding SelItem}"
|
|
Style="{StaticResource DoorParamsCmBx}"
|
|
IsEnabled="{Binding IsRaedOnly}"/>
|
|
<Button Grid.Column="1" Margin="0,2,2,2"
|
|
Visibility="{Binding VisibilityButtonAddGeometry}"
|
|
Command="{Binding DataContext.GeometryConfigCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
CommandParameter="{Binding DDFName}">
|
|
<Image Source="/Resources/TopCommandBar/Add.png" Height="16" Stretch="Uniform"/>
|
|
</Button>
|
|
</Grid>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della ComboBoxParamOnOff -->
|
|
<DataTemplate DataType="{x:Type local:ComboBoxOnOffParam}">
|
|
<Grid MouseEnter="Param_MouseEnter">
|
|
<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"/>
|
|
<TextBlock Text="{Binding Name}" Grid.Column="1" Margin="2,2,0,2">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</Grid>
|
|
<ComboBox ItemsSource="{Binding ItemList}" Grid.Column="2"
|
|
Margin="0,2,0,2"
|
|
SelectedItem="{Binding SelItem}"
|
|
Style="{StaticResource DoorParamsCmBx}"
|
|
IsEnabled="{Binding IsChecked, ElementName=ChBxBox}"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxParam}">
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
Name="TxTData"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="0,2,0,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxDGCParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxDGCParam}">
|
|
<Grid MouseEnter="Param_MouseEnter">
|
|
<!-- 3 colonne uguali -->
|
|
<Grid.ColumnDefinitions>
|
|
<!-- Nome Parametro-->
|
|
<ColumnDefinition Width="10*"/>
|
|
<!-- Valore Parametro-->
|
|
<ColumnDefinition Width="5*"/>
|
|
<!-- Simbolo di somma-->
|
|
<ColumnDefinition Width="0.6*"/>
|
|
<!-- Combo delle costanti-->
|
|
<ColumnDefinition Width="4.1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- 1 riga -->
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="-3,2,0,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
<TextBlock Grid.Column="2"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Text="+"
|
|
Margin="0,2,0,2"/>
|
|
<ComboBox ItemsSource="{Binding ConstList}" Grid.Column="3"
|
|
Margin="0,2,0,2"
|
|
SelectedItem="{Binding SelConst}"
|
|
Style="{StaticResource DoorParamsCmBx}"/>
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxThicknessParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxThicknessParam}">
|
|
<Grid MouseEnter="Param_MouseEnter">
|
|
<!-- 3 colonne uguali -->
|
|
<Grid.ColumnDefinitions>
|
|
<!-- Nome Parametro-->
|
|
<ColumnDefinition Width="10*"/>
|
|
<!-- Valore Parametro-->
|
|
<ColumnDefinition Width="5*"/>
|
|
<!-- Combo delle costanti-->
|
|
<ColumnDefinition Width="4.5*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<!-- 1 riga -->
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<TextBox Grid.Column="1"
|
|
Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding IsEnableMeasure}"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="-5,2,4,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
<ComboBox ItemsSource="{Binding ConstList}" Grid.Column="2"
|
|
DisplayMemberPath="Name"
|
|
Margin="0,2,0,2"
|
|
SelectedItem="{Binding SelConst}"
|
|
Style="{StaticResource DoorParamsCmBx}"/>
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxNgeParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxNgeParam}">
|
|
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
|
|
IsEnabled="{Binding IsActive}"
|
|
Style="{StaticResource DoorParamsTxBx}"
|
|
Margin="0,2,2,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
<Button Grid.Column="1" Margin="0,2,2,2"
|
|
Command="{Binding DataContext.ImportGeometryCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
CommandParameter="{Binding DDFName}">
|
|
<Image Source="/Resources/TopCommandBar/Search.png" Height="16" Stretch="Uniform"/>
|
|
</Button>
|
|
<Button Grid.Column="2" Margin="0,2,2,2"
|
|
Command="{Binding DataContext.DeleteGeometryCmd,RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
|
|
CommandParameter="{Binding DDFName}">
|
|
<Image Source="/Resources/TopCommandBar/X.png" Height="16" Stretch="Uniform"/>
|
|
</Button>
|
|
</Grid>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della CheckBoxParam -->
|
|
<DataTemplate DataType="{x:Type local:CheckBoxParam}">
|
|
<UniformGrid Columns="2" MouseEnter="Param_MouseEnter">
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<CheckBox IsChecked="{Binding IsChecked,UpdateSourceTrigger=PropertyChanged}"
|
|
Name="TxTData"
|
|
Style="{StaticResource DoorParamsChBx}"
|
|
HorizontalContentAlignment="Left"
|
|
Margin="0,2,0,2"
|
|
ToolTip="{Binding ToolTipValue}"/>
|
|
</UniformGrid>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type local:GhostParam}">
|
|
</DataTemplate>
|
|
|
|
<!-- Gestione della TextBoxParamOnOffParam -->
|
|
<DataTemplate DataType="{x:Type local:TextBoxOnOffParam}">
|
|
<Grid MouseEnter="Param_MouseEnter">
|
|
<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="Center"/>
|
|
<TextBlock Text="{Binding Name}" Margin="0,2,0,2">
|
|
<!--Style="{StaticResource DoorParamsTxBl}"-->
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock" >
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ErrorParameter}" Value="True">
|
|
<Setter Property="FontStyle" Value="{Binding FontStyleParam}"/>
|
|
<Setter Property="Foreground" Value="{Binding ColorParam}"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</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>
|
|
<!-- Fine gestione oggetti lsta -->
|
|
</ItemsControl>
|
|
</ContentControl>
|
|
|
|
</GroupBox>
|
|
</DataTemplate>
|
|
</local:IsFixedSelector.GroupBox>
|
|
</local:IsFixedSelector>
|
|
</ItemsControl.ItemTemplateSelector>
|
|
</ItemsControl>
|
|
|
|
<!-- Fine griglia che gestirà i parametri hardaware -->
|
|
</Grid>
|
|
|
|
<!-- Elenco pulsanti Hardware -->
|
|
<ContentControl Grid.Column="{Binding CompoPanelDiposition}" Grid.RowSpan="2" Grid.Row="0" Content="{Binding CompoPanelControl}"/>
|
|
|
|
<EgtDOORCreator:HardwareHelpSceneHostV Grid.Column="{Binding GridGeneralDiposition}" Grid.Row="1" Margin="0,0,2,0" />
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|