ad38e4d3e1
This reverts commit 00a338c202.
120 lines
6.1 KiB
XML
120 lines
6.1 KiB
XML
<EgtWPFLib5:EgtCustomWindow x:Class="ToolDbWindowV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5"
|
|
Title="{Binding Title}"
|
|
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
|
|
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
|
|
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
|
|
CloseCommand="{Binding CloseToolsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
|
|
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}">
|
|
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
|
<KeyBinding Key="Escape" Command="{Binding ReloadToolCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"/>
|
|
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
|
|
|
<EgtWPFLib5:EgtCustomWindow.Resources>
|
|
<EgtWPFLib5:ToolDrawUUIDConverter x:Key="ToolDrawUUIDConverter"/>
|
|
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
|
</EgtWPFLib5:EgtCustomWindow.Resources>
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.75*"/>
|
|
<ColumnDefinition Width="2*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="10*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<UniformGrid Grid.Row="0" Columns="3">
|
|
<Button Content="{Binding NewMsg}" Command="{Binding NewCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
|
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" Height="30"/>
|
|
<Button Content="{Binding SaveMsg}" Command="{Binding SaveCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
|
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" Height="30"/>
|
|
<Button Content="{Binding RemoveMsg}" Command="{Binding RemoveCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
|
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" Height="30"/>
|
|
</UniformGrid>
|
|
|
|
<TreeView Name="ToolsTreeView" Grid.Row="1" ItemsSource="{Binding ToolsList}">
|
|
|
|
<TreeView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type TreeViewItem}">
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
|
|
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
|
|
</Style>
|
|
</TreeView.ItemContainerStyle>
|
|
|
|
<TreeView.Resources>
|
|
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolTreeViewItem}" ItemsSource="{Binding Items}">
|
|
|
|
<Grid Height="20">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
|
|
|
</Grid>
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolTreeViewItem}">
|
|
<Grid Height="20">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
|
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15" Margin="-15,0,5,0" VerticalContentAlignment="Center"
|
|
IsChecked="{Binding Active}"
|
|
Visibility="{Binding Path=DataContext.Active_Visibility,
|
|
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
|
<TextBlock Grid.Column="1" Text="{Binding NamePar}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
|
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
</TreeView.Resources>
|
|
|
|
</TreeView>
|
|
|
|
<UniformGrid Grid.Row="2" Columns="3">
|
|
<Button Content="{Binding ImportMsg}"
|
|
Command="{Binding ImportCommand}"
|
|
IsEnabled="{Binding IsEnabledImpExpBtn, Mode=OneWay}"
|
|
Height="30"/>
|
|
<Button Content="{Binding ExportMsg}"
|
|
Command="{Binding ExportCommand}"
|
|
IsEnabled="{Binding IsEnabledImpExpBtn, Mode=OneWay}"
|
|
Height="30"/>
|
|
<Button Content="{Binding ResetMsg}"
|
|
Command="{Binding ReloadToolCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"
|
|
Height="30"/>
|
|
</UniformGrid>
|
|
|
|
</Grid>
|
|
|
|
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1"/>
|
|
|
|
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
|
|
<ContentControl Content="{Binding ToolSceneHost}" Grid.Column="2"/>
|
|
|
|
</Grid>
|
|
|
|
</EgtWPFLib5:EgtCustomWindow>
|