166 lines
8.8 KiB
XML
166 lines
8.8 KiB
XML
<EgtWPFLib5:EgtCustomWindow x:Class="MyToolDbWindowV"
|
|
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;assembly=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}"
|
|
Height="900">
|
|
<EgtWPFLib5:EgtCustomWindow.InputBindings>
|
|
<KeyBinding Key="Escape" Command="{Binding ReloadToolCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"/>
|
|
</EgtWPFLib5:EgtCustomWindow.InputBindings>
|
|
|
|
<EgtWPFLib5:EgtCustomWindow.Resources>
|
|
<!--<EgtWPFLib5:ToolParamVisibilityConverter x:Key="ToolParamVisibilityConverter"/>-->
|
|
<EgtWPFLib5:ToolDrawUUIDConverter x:Key="ToolDrawUUIDConverter"/>
|
|
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
|
|
<sys:Int32 x:Key="Corr">0</sys:Int32>
|
|
<sys:Int32 x:Key="ExitPar">1</sys:Int32>
|
|
<sys:Int32 x:Key="Coolant">2</sys:Int32>
|
|
<sys:Int32 x:Key="CornRad">3</sys:Int32>
|
|
<sys:Int32 x:Key="Diam">4</sys:Int32>
|
|
<sys:Int32 x:Key="TotDiam">5</sys:Int32>
|
|
<sys:Int32 x:Key="Feed">6</sys:Int32>
|
|
<sys:Int32 x:Key="EndFeed">7</sys:Int32>
|
|
<sys:Int32 x:Key="StartFeed">8</sys:Int32>
|
|
<sys:Int32 x:Key="TipFeed">9</sys:Int32>
|
|
<sys:Int32 x:Key="Len">10</sys:Int32>
|
|
<sys:Int32 x:Key="TotLen">11</sys:Int32>
|
|
<sys:Int32 x:Key="MaxMat">12</sys:Int32>
|
|
<sys:Int32 x:Key="LonOffset">13</sys:Int32>
|
|
<sys:Int32 x:Key="RadOffset">14</sys:Int32>
|
|
<sys:Int32 x:Key="Speed">15</sys:Int32>
|
|
<sys:Int32 x:Key="SideAng">16</sys:Int32>
|
|
<sys:Int32 x:Key="MaxSpeed">17</sys:Int32>
|
|
<sys:Int32 x:Key="Thick">18</sys:Int32>
|
|
<sys:Int32 x:Key="MaxAbsorption">19</sys:Int32>
|
|
<sys:Int32 x:Key="MinFeed">20</sys:Int32>
|
|
<sys:Int32 x:Key="Draw">21</sys:Int32>
|
|
<sys:Int32 x:Key="Head">22</sys:Int32>
|
|
<sys:Int32 x:Key="NamePar">23</sys:Int32>
|
|
<sys:Int32 x:Key="UserNotes">24</sys:Int32>
|
|
<sys:Int32 x:Key="TcPos">25</sys:Int32>
|
|
</EgtWPFLib5:EgtCustomWindow.Resources>
|
|
|
|
<Grid Background="Transparent">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.95*"/>
|
|
<ColumnDefinition Width="2*"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Background="Transparent">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="0.75*"/>
|
|
<RowDefinition Height="12*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<UniformGrid Grid.Row="0" Columns="8">
|
|
<Button ToolTip="New" Command="{Binding NewCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
|
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
|
|
Style = "{DynamicResource MachiningDB_Button}">
|
|
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
|
|
</Button>
|
|
<Button ToolTip="Save" Command="{Binding SaveCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
|
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
|
|
Style = "{DynamicResource MachiningDB_Button}">
|
|
<Image Source="/Resources/TopCommandBar/Save.png" Stretch="Uniform"/>
|
|
</Button>
|
|
<Button ToolTip="Remove" Command="{Binding RemoveCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
|
|
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
|
|
Style = "{DynamicResource MachiningDB_Button}">
|
|
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
|
|
</Button>
|
|
|
|
<Button ToolTip="Import" Command="{Binding ImportCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
|
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
|
|
Style = "{DynamicResource MachiningDB_Button}">
|
|
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
|
|
</Button>
|
|
<Button ToolTip="Export" Command="{Binding ExportCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
|
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
|
|
Style = "{DynamicResource MachiningDB_Button}">
|
|
<Image Source="/Resources/TopCommandBar/Export_1.png" Stretch="Uniform"/>
|
|
</Button>
|
|
<Button ToolTip="Reset" Command="{Binding ReloadToolCommand}"
|
|
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
|
|
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
|
|
Style = "{DynamicResource MachiningDB_Button}">
|
|
<Image Source="/Resources/TopCommandBar/Reset.png" Stretch="Uniform"/>
|
|
</Button>
|
|
</UniformGrid>
|
|
|
|
<!--Elenco degli utensili-->
|
|
<TreeView Name="ToolsTreeView" Grid.Row="1"
|
|
Background="Transparent" BorderThickness="0"
|
|
ItemsSource="{Binding ToolsList}">
|
|
<TreeView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource Db_TreeViewItem}">
|
|
<Setter Property="FontSize" Value="10" />
|
|
<Setter Property="Foreground" Value="{StaticResource Omag_White}" />
|
|
<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 Background="Transparent">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0" />
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="5,0,10,0" VerticalAlignment="Center" HorizontalAlignment="left" />
|
|
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
|
|
|
|
</Grid>
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolTreeViewItem}">
|
|
<Grid Background="Transparent">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="1*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
|
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="21" FontSize="13" Margin="30,0,10,0"
|
|
VerticalAlignment="Center" HorizontalAlignment="left"/>
|
|
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</TreeView.Resources>
|
|
|
|
</TreeView>
|
|
|
|
</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>
|